Class DexBackedStringReference
- java.lang.Object
-
- org.jf.dexlib2.base.reference.BaseReference
-
- org.jf.dexlib2.base.reference.BaseStringReference
-
- org.jf.dexlib2.dexbacked.reference.DexBackedStringReference
-
- All Implemented Interfaces:
java.lang.CharSequence
,java.lang.Comparable<java.lang.CharSequence>
,Reference
,StringReference
public class DexBackedStringReference extends BaseStringReference
-
-
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
int
stringIndex
-
Constructor Summary
Constructors Constructor Description DexBackedStringReference(DexBackedDexFile dexBuf, int stringIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getSize()
Calculate and return the private size of a string reference.java.lang.String
getString()
Gets the referenced string.void
validateReference()
Verifies that this reference is valid.-
Methods inherited from class org.jf.dexlib2.base.reference.BaseStringReference
charAt, compareTo, equals, hashCode, length, subSequence, toString
-
-
-
-
Field Detail
-
dexFile
@Nonnull public final DexBackedDexFile dexFile
-
stringIndex
public final int stringIndex
-
-
Constructor Detail
-
DexBackedStringReference
public DexBackedStringReference(@Nonnull DexBackedDexFile dexBuf, int stringIndex)
-
-
Method Detail
-
getString
@Nonnull public java.lang.String getString()
Description copied from interface:StringReference
Gets the referenced string.- Returns:
- the referenced string
-
getSize
public int getSize()
Calculate and return the private size of a string reference. Calculated as: string_data_off + string_data_item size- 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.
-
-