Top Description Fields Constructors Methods
org.droidparts.dexmaker.dx.dex.code

public final Class LocalSnapshot

extends ZeroSizeInsn
Class Inheritance
Imports
org.droidparts.dexmaker.dx.rop.code.RegisterSpec, .RegisterSpecList, .RegisterSpecSet, .SourcePosition

Pseudo-instruction which is used to hold a snapshot of the state of local variable name mappings that exists immediately after the instance in an instruction array.

Field Summary

Modifier and TypeField and Description
private final RegisterSpecSet
locals

non-null; local state associated with this instance

Constructor Summary

AccessConstructor and Description
public
LocalSnapshot(SourcePosition
non-null; source position
position
,
RegisterSpecSet
non-null; associated local variable state
locals
)

Constructs an instance.

Method Summary

Modifier and TypeMethod and Description
protected String
argString()

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.argString.

Gets the string form for any arguments to this instance.
public RegisterSpecSet

Returns:

non-null; the state
getLocals
()

Gets the local state associated with this instance.

protected String
listingString0(boolean
whether to include an explicit notation of constant pool indices
noteIndices
)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.listingString0.

Helper for listingString, which returns the string form of this instance suitable for inclusion in a human-oriented listing dump, not including the instruction address and without respect for any output formatting.
public DalvInsn
withRegisterOffset(int
the amount to offset register references by
delta
)

Overrides org.droidparts.dexmaker.dx.dex.code.ZeroSizeInsn.withRegisterOffset.

Returns an instance that is just like this one, except that all register references have been offset by the given delta, and its address is reset.
public DalvInsn
withRegisters(RegisterSpecList
non-null; new register list
registers
)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisters.

Returns an instance that is just like this one, except that the register list is replaced by the given one, and its address is reset.
Inherited from org.droidparts.dexmaker.dx.dex.code.ZeroSizeInsn:
codeSizewithOpcodewriteTo

Field Detail

localsback to summary
private final RegisterSpecSet locals

non-null; local state associated with this instance

Constructor Detail

LocalSnapshotback to summary
public LocalSnapshot(SourcePosition position, RegisterSpecSet locals)

Constructs an instance. The output address of this instance is initially unknown (-1).

Parameters
position:SourcePosition

non-null; source position

locals:RegisterSpecSet

non-null; associated local variable state

Method Detail

argStringback to summary
protected String argString()

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.argString.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.argString.

Gets the string form for any arguments to this instance. Subclasses must override this.

Returns:String

null-ok; the string version of any arguments or null if there are none

Annotations
@Override
getLocalsback to summary
public RegisterSpecSet getLocals()

Gets the local state associated with this instance.

Returns:RegisterSpecSet

non-null; the state

listingString0back to summary
protected String listingString0(boolean noteIndices)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.listingString0.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.listingString0.

Helper for listingString, which returns the string form of this instance suitable for inclusion in a human-oriented listing dump, not including the instruction address and without respect for any output formatting. This method should return null if this instance should not appear in a listing.

Parameters
noteIndices:boolean

whether to include an explicit notation of constant pool indices

Returns:String

null-ok; the listing string

Annotations
@Override
withRegisterOffsetback to summary
public DalvInsn withRegisterOffset(int delta)

Overrides org.droidparts.dexmaker.dx.dex.code.ZeroSizeInsn.withRegisterOffset.

Doc from org.droidparts.dexmaker.dx.dex.code.ZeroSizeInsn.withRegisterOffset.

Returns an instance that is just like this one, except that all register references have been offset by the given delta, and its address is reset.

Parameters
delta:int

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisterOffset.

the amount to offset register references by

Returns:DalvInsn

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisterOffset.

non-null; an appropriately-constructed instance

Annotations
@Override
withRegistersback to summary
public DalvInsn withRegisters(RegisterSpecList registers)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisters.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisters.

Returns an instance that is just like this one, except that the register list is replaced by the given one, and its address is reset.

Parameters
registers:RegisterSpecList

non-null; new register list

Returns:DalvInsn

non-null; an appropriately-constructed instance

Annotations
@Override