Interface IDexString
- All Superinterfaces:
ICodeData
,ICodeItem
,ICodeString
These objects represent DEX strings. The value of a string can be modified programmatically.
-
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 TypeMethodDescriptionThis method provides a hint regarding how this string is used.This method provides a hint regarding whether this string appears to be used in the dex unit.getValue
(boolean effective) Retrieve the string value.void
Set the alternate value of a string.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeItem
getAddress, getAddress, getGenericFlags, getIndex, getItemId, getName, getName, getSignature, getSignature, getSignature, isArtificial, isInternal
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeString
getIdentifier, getValue
-
Method Details
-
getValue
Retrieve the string value.- Parameters:
effective
- true to retrieve the current value, false to retrieve the original value- Returns:
-
setValue
Set the alternate value of a string. This method does not check for duplicates in the string pool: it may break the DEX specifications.On success, it is the responsibility of the caller to notify client code that the unit has changed, by issuing a
J#UnitChange
tolisteners
.- Parameters:
value
- the new value, or null to reset to the original value
-
getHintUsedInDex
Boolean getHintUsedInDex()This method provides a hint regarding whether this string appears to be used in the dex unit. Usage here is meant in the broadest sense: it could be a string immediate used in Dalvik, or a meta string referenced by other dex objects present in one of the dex files parsed to create the dex unit.- Returns:
- true if the string is used; false if the string is not used (dangling string); null if unknown
-
getHintUsedAsImmediate
Boolean getHintUsedAsImmediate()This method provides a hint regarding how this string is used. If true, it appears that it is used as an immediate in the code, e.g. as a parameter to aconst-string
opcode. If false, it appears the string used used as a metadata element, such as a method name, or part of a type descriptor.- Returns:
- true if the string is used as an immediate; false if the string is a pure metadata element (this method never returns null)
-