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 DexBackedDexFiledexFile
-
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.StringgetDefiningClass()Gets the type of the class that defines the referenced field.java.lang.StringgetName()Gets the name of the referenced field.intgetSize()Calculate and return the private size of a field reference.java.lang.StringgetType()Gets the type of the referenced field.voidvalidateReference()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:FieldReferenceGets 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:FieldReferenceGets the name of the referenced field.- Returns:
- The name of the referenced field
-
getType
@Nonnull public java.lang.String getType()
Description copied from interface:FieldReferenceGets 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.InvalidReferenceExceptionDescription copied from interface:ReferenceVerifies that this reference is valid.- Specified by:
validateReferencein interfaceReference- Overrides:
validateReferencein classBaseReference- Throws:
Reference.InvalidReferenceException- If the reference is not valid.
-
-