public class DexClass
extends java.lang.Object
This class represents a DEX class_def_item
object.
DexClassData
Modifier and Type | Field and Description |
---|---|
static int |
INNER_ANONYMOUS_CLASS
Custom flag set by
getInnerFlags() when an inner class is an anonymous class. |
static int |
INNER_CLASS
Custom flag set by
getInnerFlags() when a class is an inner class. |
static int |
INNER_LOCAL_CLASS
Custom flag set by
getInnerFlags() when an inner class is a local (method-enclosed) class. |
static int |
INNER_MEMBER_CLASS
Custom flag set by
getInnerFlags() when an inner class is a member (class-enclosed) class. |
static int |
INNER_OBFUSCATED
Custom flag set by
getInnerFlags() when an inner class structure was obfuscated. |
Modifier and Type | Method and Description |
---|---|
int |
getAccessFlags()
Get the access flags for the class.
|
DexAnnotationsDirectory |
getAnnotationsDirectory()
Get the annotations directory of the class.
|
int |
getClasstypeIndex()
Get the type index for this class object.
|
DexClassData |
getData()
Get the class data information (fields, methods) for this class.
|
int |
getInnerFlags()
Determine if the class is a member, local, or anonymous class nested within another class.
|
int[] |
getInterfaceIndexes()
Get the type indexes of the interfaces implemented by this class.
|
int |
getSourceIndex()
Get the string index for the file name containing the original source for this class.
|
java.util.List<DexValue> |
getStaticInitializers()
Get the static initializers of the class.
|
int |
getSuperclassIndex()
Get the type index for the superclass of this class.
|
int |
getUserFlags()
Get user-defined flags for the class.
|
void |
setUserFlags(int flags)
Set user-defined flags for the class.
|
public static final int INNER_CLASS
Custom flag set by getInnerFlags()
when a class is an inner class.
public static final int INNER_OBFUSCATED
Custom flag set by getInnerFlags()
when an inner class structure was obfuscated.
public static final int INNER_MEMBER_CLASS
Custom flag set by getInnerFlags()
when an inner class is a member (class-enclosed) class.
public static final int INNER_LOCAL_CLASS
Custom flag set by getInnerFlags()
when an inner class is a local (method-enclosed) class.
public static final int INNER_ANONYMOUS_CLASS
Custom flag set by getInnerFlags()
when an inner class is an anonymous class.
public int getClasstypeIndex()
Get the type index for this class object.
public int getAccessFlags()
Get the access flags for the class.
public int getSuperclassIndex()
Get the type index for the superclass of this class.
public int[] getInterfaceIndexes()
Get the type indexes of the interfaces implemented by this class.
public int getSourceIndex()
Get the string index for the file name containing the original source for this class.
Note: This is a debug/metadata field and should be used with caution.
public DexClassData getData()
Get the class data information (fields, methods) for this class.
The DEX specifications call it class_data_item
.
public java.util.List<DexValue> getStaticInitializers()
Get the static initializers of the class.
public DexAnnotationsDirectory getAnnotationsDirectory()
Get the annotations directory of the class.
The DEX specifications call it annotations_directory_item
.
public int getUserFlags()
Get user-defined flags for the class. (This is not a DEX element.)
public void setUserFlags(int flags)
Set user-defined flags for the class. (This is not a DEX element.)
flags
- the user-defined flagspublic int getInnerFlags()
Determine if the class is a member, local, or anonymous class nested within another class. Static member classes are not considered inner classes. This method also returns information regarding obfuscation of inner class structure.
INNER_*
flags. An inner class will have
at least the INNER_CLASS
bit set