Package com.android.dx.cf.iface
Interface AttributeList
- All Known Implementing Classes:
StdAttributeList
public interface AttributeList
Interface for lists of attributes.
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the total length of this list in bytes, when part of a class file.Get the first attribute in the list with the given name, if any.Get the next attribute in the list after the given one, with the same name, if any.get
(int n) Get then
th attribute.boolean
Get whether this instance is mutable.int
size()
Get the number of attributes in the list.
-
Method Details
-
isMutable
boolean isMutable()Get whether this instance is mutable. Note that theAttributeList
interface itself doesn't provide any means of mutation, but that doesn't mean that there isn't a non-interface way of mutating an instance.- Returns:
true
iff this instance is somehow mutable
-
size
int size()Get the number of attributes in the list.- Returns:
- the size
-
get
Get then
th attribute.- Parameters:
n
-n >= 0, n < size();
which attribute- Returns:
non-null;
the attribute in question
-
byteLength
int byteLength()Get the total length of this list in bytes, when part of a class file. The returned value includes the two bytes for theattributes_count
length indicator.- Returns:
>= 2;
the total length, in bytes
-
findFirst
Get the first attribute in the list with the given name, if any.- Parameters:
name
-non-null;
attribute name- Returns:
null-ok;
first attribute in the list with the given name, ornull
if there is none
-
findNext
Get the next attribute in the list after the given one, with the same name, if any.- Parameters:
attrib
-non-null;
attribute to start looking after- Returns:
null-ok;
next attribute afterattrib
with the same name asattrib
-