public interface IAttributeCollection extends java.lang.Cloneable, IClassFormatOutput
Attribute_info
structures. The order in which they appear is
unspecified.Modifier and Type | Method and Description |
---|---|
void |
accept(IClassDefVisitor visitor,
java.lang.Object ctx) |
int |
add(Attribute_info attribute)
Adds a new Attribute_info descriptor to this collection.
|
java.lang.Object |
clone() |
Attribute_info |
get(int offset)
Returns the attribute descriptor at a given offset.
|
InnerClassesAttribute_info |
getInnerClassesAttribute() |
boolean |
hasBridge() |
boolean |
hasSynthetic() |
long |
length()
Returns the total length of this collection when converted to
.class format [including 2 count bytes]
|
Attribute_info |
remove(int offset)
Removes the Attribute_info descriptor at a given offset.
|
Attribute_info |
set(int offset,
Attribute_info attribute)
Replaces the Attribute_info descriptor at a given offset.
|
int |
size()
Returns the number of attributes in this collection [can be 0].
|
writeInClassFormat
Attribute_info get(int offset)
offset
- attribute offset [must be in [0, size()) range; input not checked]java.lang.IndexOutOfBoundsException
- if 'offset' is outside of valid rangeboolean hasSynthetic()
boolean hasBridge()
InnerClassesAttribute_info getInnerClassesAttribute()
int size()
long length()
java.lang.Object clone()
void accept(IClassDefVisitor visitor, java.lang.Object ctx)
int add(Attribute_info attribute)
attribute
- new attribute descriptor [may not be null]Attribute_info set(int offset, Attribute_info attribute)
offset
- attribute offset [must be in [0, size()) range; input not checked]attribute
- new attribute descriptor [may not be null]java.lang.IndexOutOfBoundsException
- if 'offset' is outside of valid rangeAttribute_info remove(int offset)
offset
- attribute offset [must be in [0, size()) range; input not checked]java.lang.IndexOutOfBoundsException
- if 'offset' is outside of valid range