com.android.dx.cf.iface
Class StdFieldList

java.lang.Object
  extended by com.android.dx.util.MutabilityControl
      extended by com.android.dx.util.FixedSizeList
          extended by com.android.dx.cf.iface.StdFieldList
All Implemented Interfaces:
FieldList, ToHuman

public final class StdFieldList
extends FixedSizeList
implements FieldList

Standard implementation of FieldList, which directly stores an array of Field objects and can be made immutable.


Constructor Summary
StdFieldList(int size)
          Constructs an instance.
 
Method Summary
 Field get(int n)
          Get the nth field.
 void set(int n, Field field)
          Sets the field 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
 
Methods inherited from interface com.android.dx.cf.iface.FieldList
isMutable, size
 

Constructor Detail

StdFieldList

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

Parameters:
size - the size of the list
Method Detail

get

public Field get(int n)
Get the nth field.

Specified by:
get in interface FieldList
Parameters:
n - n >= 0, n < size(); which field
Returns:
non-null; the field in question

set

public void set(int n,
                Field field)
Sets the field at the given index.

Parameters:
n - >= 0, < size(); which field
field - null-ok; the field object


Copyright © 2015. All rights reserved.