com.pnfsoftware.jeb.core.units.code.android.ir.IDImm |
This dual-purpose dexdec
IR element serves to encode immediate values (primitives and
pooled strings) and evaluated
values (primitives and objects).
They can be:
- primitives
- null objects
- pooled java.lang.String
objects
- references to live objects (including arrays) living in an IR state
Examples:
String s = a == 1 ? "hello": null; ^ ^^^^^^^ ^^^^
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.pnfsoftware.jeb.core.units.code.android.ir.IDElement
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract IDImm |
duplicate()
Duplicate this element.
| ||||||||||
abstract IDImm |
duplicateWithDifferentType(IJavaType type)
Duplicate this immediate and assign it a different type.
| ||||||||||
abstract Object |
getImmediateAsJavaObject(IDGlobalContext gctx)
Resolve this primitive or pooled string immediate to a Java object: either the effective
String value if it is a string, or one of boxed primitive object type if it is a
primitive. | ||||||||||
abstract int |
getObjectReferenceId()
Get the reference object id.
| ||||||||||
abstract long |
getRawValue()
Retrieve the raw value encoded by this immediate.
| ||||||||||
abstract int |
getStringIndex()
Retrieve the pool index of a pooled string immediate.
| ||||||||||
abstract String |
getStringValue(IDGlobalContext gctx)
Resolve the pooled string constant to its effective value.
| ||||||||||
abstract boolean |
isNonNullRef()
Determine whether this immediate is a non-null reference.
| ||||||||||
abstract boolean |
isNullRef()
Determine whether this immediate is a null reference.
| ||||||||||
abstract boolean |
isRef()
Determine whether this immediate is a reference.
| ||||||||||
abstract boolean |
isString()
Determine whether this immediate is a pooled string.
| ||||||||||
abstract boolean |
isZeroEquivalent()
Determine whether the immediate encodes zero (e.g.
| ||||||||||
abstract boolean |
maybeNonNullRef()
Determine whether this immediate may be a reference that is not the null reference.
| ||||||||||
abstract boolean |
maybeNullRef()
Determine whether this immediate may be a reference that is the null reference.
| ||||||||||
abstract boolean |
maybeRef()
Determine whether this immediate may be a reference.
| ||||||||||
abstract double |
toDouble()
Evaluate this immediate as a double-precision float.
| ||||||||||
abstract float |
toFloat()
Evaluate this immediate as a single-precision float.
| ||||||||||
abstract long |
toLong()
Evaluate this immediate as a signed long primitive.
| ||||||||||
abstract long |
toLong(boolean treatSregAsInt)
Evaluate this immediate as a signed long primitive.
| ||||||||||
abstract long |
toUnsignedLong()
Evaluate this immediate as an unsigned long.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.pnfsoftware.jeb.core.units.code.IInstructionOperand
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.android.ir.IDElement
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.android.ir.IDExpression
|
Duplicate this element.
Duplicate this immediate and assign it a different type.
type | type of the duplicated immediate; note for String constants: although type update
is allowed, it must be a type implementing java.lang.CharSequence |
---|
Resolve this primitive or pooled string immediate to a Java object: either the effective
String
value if it is a string, or one of boxed primitive object type if it is a
primitive.
Get the reference object id. The value returned by this method is moot unless
isRef()
is true.
Retrieve the raw value encoded by this immediate. All values (primitives, pool indices,
object references) can fit on a long
; hence this method's return type.
Retrieve the pool index of a pooled string immediate. This method will fail unless
isString()
is true
.
Resolve the pooled string constant to its effective value. This method will throw if this
immediate is not a string constant
.
Determine whether this immediate is a non-null reference. Beware: if the immediate is not typed as an object, this method will return false in all case.
Determine whether this immediate is a null reference. Beware: if the immediate is not typed as an object, this method will return false in all case.
Determine whether this immediate is a reference.
Note: pooled strings are not treated as references by this method.
Determine whether this immediate is a pooled string.
Determine whether the immediate encodes zero (e.g. integer/float:0, boolean:false, ref:null)
Determine whether this immediate may be a reference that is not the null reference.
Determine whether this immediate may be a reference that is the null reference.
Determine whether this immediate may be a reference.
Note: pooled strings are not treated as references by this method.
Evaluate this immediate as a double-precision float. The immediate must be of type
float
or double
.@return
DexDecEvaluationException |
---|
Evaluate this immediate as a single-precision float. The immediate must be of type
float
.@return
DexDecEvaluationException |
---|
Evaluate this immediate as a signed long primitive.
Note: if this constant is an object reference, the reference id is returned.@return
DexDecEvaluationException |
---|
Evaluate this immediate as a signed long primitive.
Note: if this constant is an object reference, the reference id is returned.@return
treatSregAsInt | if true, and if this object is typed as a
single-slot wildcard , it is treated as a
signed immediate (and sign-extension is applied) |
---|
DexDecEvaluationException |
---|
Evaluate this immediate as an unsigned long.
Note: if this constant is an object reference, the reference id is returned.@return
DexDecEvaluationException | the type of this immediate does not permit its resolution to a long primitive |
---|