FileDocCategorySizeDatePackage
LocalSnapshot.javaAPI DocAndroid 1.5 API2866Wed May 06 22:41:02 BST 2009com.android.dx.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.dx.rop.code.RegisterSpecSet
locals
non-null; local state associated with this instance
Constructors Summary
public LocalSnapshot(com.android.dx.rop.code.SourcePosition position, com.android.dx.rop.code.RegisterSpecSet locals)
Constructs an instance. The output address of this instance is initially unknown (-1).

param
position non-null; source position
param
locals 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.dx.rop.code.RegisterSpecSetgetLocals()
Gets the local state associated with this instance.

return
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.dx.rop.code.RegisterSpecList registers)
{@inheritDoc}

        return new LocalSnapshot(getPosition(), locals);