com.android.dx.cf.iface
Class StdMethodList

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

public final class StdMethodList
extends FixedSizeList
implements MethodList

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


Constructor Summary
StdMethodList(int size)
          Constructs an instance.
 
Method Summary
 Method get(int n)
          Get the nth method.
 void set(int n, Method method)
          Sets the method 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.MethodList
isMutable, size
 

Constructor Detail

StdMethodList

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

Parameters:
size - the size of the list
Method Detail

get

public Method get(int n)
Get the nth method.

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

set

public void set(int n,
                Method method)
Sets the method at the given index.

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


Copyright © 2015. All rights reserved.