FileDocCategorySizeDatePackage
LocalSnapshot.javaAPI DocAndroid 5.1 API3102Thu Mar 12 22:18:30 GMT 2015com.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
{@code 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 ({@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.dx.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 DalvInsnwithMapper(com.android.dx.ssa.RegisterMapper mapper)
{@inheritDoc}

      return new LocalSnapshot(getPosition(), mapper.map(locals));
    
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);