FileDocCategorySizeDatePackage
CodeAddress.javaAPI DocAndroid 5.1 API3056Thu Mar 12 22:18:30 GMT 2015com.android.dx.dex.code

CodeAddress

public final class CodeAddress extends ZeroSizeInsn
Pseudo-instruction which is used to track an address within a code array. Instances are used for such things as branch targets and exception handler ranges. Its code size is zero, and so instances do not in general directly wind up in any output (either human-oriented or binary file).

Fields Summary
private final boolean
bindsClosely
If this address should bind closely to the following real instruction
Constructors Summary
public CodeAddress(com.android.dx.rop.code.SourcePosition position)
Constructs an instance. The output address of this instance is initially unknown ({@code -1}).

param
position {@code non-null;} source position

        this(position, false);
    
public CodeAddress(com.android.dx.rop.code.SourcePosition position, boolean bindsClosely)
Constructs an instance. The output address of this instance is initially unknown ({@code -1}).

param
position {@code non-null;} source position
param
bindsClosely if the address should bind closely to the following real instruction.

        super(position);
        this.bindsClosely = bindsClosely;
    
Methods Summary
protected java.lang.StringargString()
{@inheritDoc}

        return null;
    
public booleangetBindsClosely()
Gets whether this address binds closely to the following "real" (non-zero-length) instruction. When a prefix is added to an instruction (for example, to move a value from a high register to a low register), this determines whether this {@code CodeAddress} will point to the prefix, or to the instruction itself. If bindsClosely is true, the address will point to the instruction itself, otherwise it will point to the prefix (if any)

return
true if this address binds closely to the next real instruction

        return bindsClosely;
    
protected java.lang.StringlistingString0(boolean noteIndices)
{@inheritDoc}

        return "code-address";
    
public final DalvInsnwithRegisters(com.android.dx.rop.code.RegisterSpecList registers)
{@inheritDoc}

        return new CodeAddress(getPosition());