Class DexBackedFieldReference
- java.lang.Object
-
- org.jf.dexlib2.base.reference.BaseReference
-
- org.jf.dexlib2.base.reference.BaseFieldReference
-
- org.jf.dexlib2.dexbacked.reference.DexBackedFieldReference
-
- All Implemented Interfaces:
java.lang.Comparable<FieldReference>
,FieldReference
,Reference
public class DexBackedFieldReference extends BaseFieldReference
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jf.dexlib2.iface.reference.Reference
Reference.InvalidReferenceException
-
-
Field Summary
Fields Modifier and Type Field Description DexBackedDexFile
dexFile
-
Constructor Summary
Constructors Constructor Description DexBackedFieldReference(DexBackedDexFile dexFile, int fieldIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDefiningClass()
Gets the type of the class that defines the referenced field.java.lang.String
getName()
Gets the name of the referenced field.int
getSize()
Calculate and return the private size of a field reference.java.lang.String
getType()
Gets the type of the referenced field.void
validateReference()
Verifies that this reference is valid.-
Methods inherited from class org.jf.dexlib2.base.reference.BaseFieldReference
compareTo, equals, hashCode, toString
-
-
-
-
Field Detail
-
dexFile
@Nonnull public final DexBackedDexFile dexFile
-
-
Constructor Detail
-
DexBackedFieldReference
public DexBackedFieldReference(@Nonnull DexBackedDexFile dexFile, int fieldIndex)
-
-
Method Detail
-
getDefiningClass
@Nonnull public java.lang.String getDefiningClass()
Description copied from interface:FieldReference
Gets the type of the class that defines the referenced field.- Returns:
- The type of the class that defines the referenced field
-
getName
@Nonnull public java.lang.String getName()
Description copied from interface:FieldReference
Gets the name of the referenced field.- Returns:
- The name of the referenced field
-
getType
@Nonnull public java.lang.String getType()
Description copied from interface:FieldReference
Gets the type of the referenced field.- Returns:
- The type of the referenced field
-
getSize
public int getSize()
Calculate and return the private size of a field reference. Calculated as: class_idx + type_idx + name_idx- Returns:
- size in bytes
-
validateReference
public void validateReference() throws Reference.InvalidReferenceException
Description copied from interface:Reference
Verifies that this reference is valid.- Specified by:
validateReference
in interfaceReference
- Overrides:
validateReference
in classBaseReference
- Throws:
Reference.InvalidReferenceException
- If the reference is not valid.
-
-