|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.util.MutabilityControl
com.android.dx.util.FixedSizeList
com.android.dx.cf.iface.StdAttributeList
public final class StdAttributeList
Standard implementation of AttributeList, which directly stores
an array of Attribute objects and can be made immutable.
| Constructor Summary | |
|---|---|
StdAttributeList(int size)
Constructs an instance. |
|
| Method Summary | |
|---|---|
int |
byteLength()
Get the total length of this list in bytes, when part of a class file. |
Attribute |
findFirst(String name)
Get the first attribute in the list with the given name, if any. |
Attribute |
findNext(Attribute attrib)
Get the next attribute in the list after the given one, with the same name, if any. |
Attribute |
get(int n)
Get the nth attribute. |
void |
set(int n,
Attribute attribute)
Sets the attribute 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.AttributeList |
|---|
isMutable, size |
| Constructor Detail |
|---|
public StdAttributeList(int size)
null.
size - the size of the list| Method Detail |
|---|
public Attribute get(int n)
nth attribute.
get in interface AttributeListn - n >= 0, n < size(); which attribute
non-null; the attribute in questionpublic int byteLength()
attributes_count length indicator.
byteLength in interface AttributeList>= 2; the total length, in bytespublic Attribute findFirst(String name)
findFirst in interface AttributeListname - non-null; attribute name
null-ok; first attribute in the list with the given name,
or null if there is nonepublic Attribute findNext(Attribute attrib)
findNext in interface AttributeListattrib - non-null; attribute to start looking after
null-ok; next attribute after attrib with the
same name as attrib
public void set(int n,
Attribute attribute)
n - >= 0, < size(); which attributeattribute - null-ok; the attribute object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||