FileDocCategorySizeDatePackage
IAttributeCollection.javaAPI DocAndroid 1.5 API3430Wed May 06 22:41:16 BST 2009com.vladium.jcd.cls

IAttributeCollection

public interface IAttributeCollection implements Cloneable, com.vladium.jcd.compiler.IClassFormatOutput
An abstraction of the 'attributes' component of .class format. The contents are {@link Attribute_info} structures. The order in which they appear is unspecified.
author
(C) 2001, Vlad Roubtsov

Fields Summary
Constructors Summary
Methods Summary
public voidaccept(IClassDefVisitor visitor, java.lang.Object ctx)

public intadd(Attribute_info attribute)
Adds a new Attribute_info descriptor to this collection. No duplicate checks are made. It is the responsibility of the caller to ensure that all data referenced in 'attribute' will eventually appear in the constant pool.

param
attribute new attribute descriptor [may not be null]

public java.lang.Objectclone()

public Attribute_infoget(int offset)
Returns the attribute descriptor at a given offset.

param
offset attribute offset [must be in [0, size()) range; input not checked]
return
Attribute_info descriptor [never null]
throws
IndexOutOfBoundsException if 'offset' is outside of valid range

public InnerClassesAttribute_infogetInnerClassesAttribute()

public booleanhasBridge()

public booleanhasSynthetic()

public longlength()
Returns the total length of this collection when converted to .class format [including 2 count bytes]

public Attribute_inforemove(int offset)
Removes the Attribute_info descriptor at a given offset.

param
offset attribute offset [must be in [0, size()) range; input not checked]
return
current attribute descriptor at this offset [never null]
throws
IndexOutOfBoundsException if 'offset' is outside of valid range

public Attribute_infoset(int offset, Attribute_info attribute)
Replaces the Attribute_info descriptor at a given offset. No duplicate checks are made. It is the responsibility of the caller to ensure that all data referenced in 'attribute' will eventually appear in the constant pool.

param
offset attribute offset [must be in [0, size()) range; input not checked]
param
attribute new attribute descriptor [may not be null]
return
previous attribute descriptor at this offset [never null]
throws
IndexOutOfBoundsException if 'offset' is outside of valid range

public intsize()
Returns the number of attributes in this collection [can be 0].