com.android.dx.dex.code
Class LocalList

java.lang.Object
  extended by com.android.dx.util.MutabilityControl
      extended by com.android.dx.util.FixedSizeList
          extended by com.android.dx.dex.code.LocalList
All Implemented Interfaces:
ToHuman

public final class LocalList
extends FixedSizeList

List of local variables. Each local variable entry indicates a range of code which it is valid for, a register number, a name, and a type.


Nested Class Summary
static class LocalList.Disposition
          Disposition of a local entry.
static class LocalList.Entry
          Entry in a local list.
static class LocalList.MakeState
          Intermediate state when constructing a local list.
 
Field Summary
static LocalList EMPTY
          non-null; empty instance
 
Constructor Summary
LocalList(int size)
          Constructs an instance.
 
Method Summary
 void debugPrint(PrintStream out, String prefix)
          Does a human-friendly dump of this instance.
 LocalList.Entry get(int n)
          Gets the element at the given index.
static LocalList make(DalvInsnList insns)
          Constructs an instance for the given method, based on the given block order and intermediate local information.
 void set(int n, LocalList.Entry entry)
          Sets the entry at the given index.
 
Methods inherited from class com.android.dx.util.FixedSizeList
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toHuman, toString, toString
 
Methods inherited from class com.android.dx.util.MutabilityControl
isImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final LocalList EMPTY
non-null; empty instance

Constructor Detail

LocalList

public LocalList(int size)
Constructs an instance. All indices initially contain null.

Parameters:
size - >= 0; the size of the list
Method Detail

get

public LocalList.Entry get(int n)
Gets the element at the given index. It is an error to call this with the index for an element which was never set; if you do that, this will throw NullPointerException.

Parameters:
n - >= 0, < size(); which index
Returns:
non-null; element at that index

set

public void set(int n,
                LocalList.Entry entry)
Sets the entry at the given index.

Parameters:
n - >= 0, < size(); which index
entry - non-null; the entry to set at n

debugPrint

public void debugPrint(PrintStream out,
                       String prefix)
Does a human-friendly dump of this instance.

Parameters:
out - non-null; where to dump
prefix - non-null; prefix to attach to each line of output

make

public static LocalList make(DalvInsnList insns)
Constructs an instance for the given method, based on the given block order and intermediate local information.

Parameters:
insns - non-null; instructions to convert
Returns:
non-null; the constructed list


Copyright © 2013. All Rights Reserved.