Interface IDexType
This interface represents a reference to a dex type used in the dex. It may be internal or
external. If the type is internal (defined in the dex), the implementation should be located in
the associated
IDexClass
object. Types can be retrieved via IDexUnit
.- See Also:
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeItem
FLAG_ABSTRACT, FLAG_ANNOTATION, FLAG_ANONYMOUS, FLAG_ARTIFICIAL, FLAG_BRIDGE, FLAG_CONSTRUCTOR, FLAG_DECLARED_SYNCHRONIZED, FLAG_DESTRUCTOR, FLAG_ENUM, FLAG_FINAL, FLAG_INNER, FLAG_INTERFACE, FLAG_INTERNAL, FLAG_NATIVE, FLAG_PRIVATE, FLAG_PROTECTED, FLAG_PUBLIC, FLAG_STATIC, FLAG_STRICT, FLAG_SYNCHRONIZED, FLAG_SYNTHETIC, FLAG_TRANSIENT, FLAG_VARARGS, FLAG_VIRTUAL, FLAG_VOLATILE
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the list of array types based on this type.int
Get the array type dimensions.Retrieve the implementation of this type, if it is internal.Retrieve the base type of an array type.Retrieve the non-array signature of a class or interface type.Generate the type signature.getSignature
(boolean effective, boolean internal) Generate the type signature.getSignature
(boolean effective, boolean internal, boolean qualifiedNames) Generate the type signature.boolean
isArray()
Determine whether the type is an array type.boolean
Determine whether the type is an array of primitives.boolean
isClass()
Determine if the type is a class or interface (not an array, not a primitive type)boolean
Determine whether the type is a primitive type.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeItem
getAddress, getAddress, getGenericFlags, getIndex, getItemId, getName, getName, getSignature, isArtificial, isInternal
-
Method Details
-
getImplementingClass
IDexClass getImplementingClass()Retrieve the implementation of this type, if it is internal.- Specified by:
getImplementingClass
in interfaceICodeType
- Returns:
- a class object, null if none
-
isClass
boolean isClass()Determine if the type is a class or interface (not an array, not a primitive type)- Returns:
-
isArray
boolean isArray()Determine whether the type is an array type.- Returns:
-
getDimensions
int getDimensions()Get the array type dimensions.Examples:
[I
(that is,int[]
) will return 1,[[J
(that is,long[][]
) will return 2- Returns:
- the number of dimensions
-
isPrimitive
boolean isPrimitive()Determine whether the type is a primitive type.- Returns:
-
isArrayOfPrimitive
boolean isArrayOfPrimitive()Determine whether the type is an array of primitives.- Returns:
-
getNonArrayClass
String getNonArrayClass()Retrieve the non-array signature of a class or interface type. Will return null for primitives or arrays of primitives.Example: type is
[La/b/Foo
the method will returnLa/b/Foo
- Returns:
-
getMasterType
IDexType getMasterType()Retrieve the base type of an array type.Example: if this type is
[[I
, the method will return the type object forI
- Returns:
-
getDependantTypes
Retrieve the list of array types based on this type.- Returns:
-
getSignature
String getSignature()Generate the type signature. The generated signature represents the effective name in internal form.- Specified by:
getSignature
in interfaceICodeItem
- Returns:
- the effective signature
-
getSignature
Generate the type signature.- Specified by:
getSignature
in interfaceICodeItem
- Parameters:
effective
- true to use the effective names (renames), false to use the original namesinternal
- true to generate an internal signature (Lcom/abc/Foo;), false to generate a user-friendly signature (com.abc.Foo)- Returns:
- the type signature
-
getSignature
Generate the type signature.- Parameters:
effective
- true to use the effective names (renames), false to use the original namesinternal
- true to generate an internal signature (Lcom/abc/Foo;), false to generate a user-friendly signature (com.abc.Foo)qualifiedNames
- true to generate qualified names (a.b.c.Foo), false to generate simple type names (Foo)- Returns:
- the type signature
-