FileDocCategorySizeDatePackage
LocalSnapshot.javaAPI DocAndroid 5.1 API2911Thu Mar 12 22:18:28 GMT 2015com.android.dexgen.dex.code

LocalSnapshot

public final class LocalSnapshot extends ZeroSizeInsn
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.

Fields Summary
private final com.android.dexgen.rop.code.RegisterSpecSet
locals
{@code non-null;} local state associated with this instance
Constructors Summary
public LocalSnapshot(com.android.dexgen.rop.code.SourcePosition position, com.android.dexgen.rop.code.RegisterSpecSet locals)
Constructs an instance. The output address of this instance is initially unknown ({@code -1}).

param
position {@code non-null;} source position
param
locals {@code non-null;} associated local variable state

        super(position);

        if (locals == null) {
            throw new NullPointerException("locals == null");
        }

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

        return locals.toString();
    
public com.android.dexgen.rop.code.RegisterSpecSetgetLocals()
Gets the local state associated with this instance.

return
{@code non-null;} the state

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

        int sz = locals.size();
        int max = locals.getMaxSize();
        StringBuffer sb = new StringBuffer(100 + sz * 40);

        sb.append("local-snapshot");

        for (int i = 0; i < max; i++) {
            RegisterSpec spec = locals.get(i);
            if (spec != null) {
                sb.append("\n  ");
                sb.append(LocalStart.localString(spec));
            }
        }

        return sb.toString();
    
public DalvInsnwithRegisterOffset(int delta)
{@inheritDoc}

        return new LocalSnapshot(getPosition(), locals.withOffset(delta));
    
public DalvInsnwithRegisters(com.android.dexgen.rop.code.RegisterSpecList registers)
{@inheritDoc}

        return new LocalSnapshot(getPosition(), locals);