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 DexBackedDexFiledexFileintstringIndex
-
Constructor Summary
Constructors Constructor Description DexBackedStringReference(DexBackedDexFile dexBuf, int stringIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetSize()Calculate and return the private size of a string reference.java.lang.StringgetString()Gets the referenced string.voidvalidateReference()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:StringReferenceGets 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.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.
-
-