public final class StdAttributeList extends FixedSizeList implements AttributeList
AttributeList, which directly stores
an array of Attribute objects and can be made immutable.| Constructor and Description |
|---|
StdAttributeList(int size)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
byteLength()
Get the total length of this list in bytes, when part of a
class file.
|
Attribute |
findFirst(java.lang.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.
|
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toHuman, toString, toStringisImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutableclone, finalize, getClass, notify, notifyAll, wait, wait, waitisMutable, sizepublic StdAttributeList(int size)
null.size - the size of the listpublic Attribute get(int n)
nth attribute.get in interface AttributeListn - n >= 0, n < size(); which attributenon-null; the attribute in questionpublic int byteLength()
attributes_count length indicator.byteLength in interface AttributeList>= 2; the total length, in bytespublic Attribute findFirst(java.lang.String name)
findFirst in interface AttributeListname - non-null; attribute namenull-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 afternull-ok; next attribute after attrib with the
same name as attribpublic void set(int n,
Attribute attribute)
n - >= 0, < size(); which attributeattribute - null-ok; the attribute objectCopyright © 2020. All Rights Reserved.