public interface IFieldCollection extends java.lang.Cloneable, IClassFormatOutput
Field_info structures corresponding to all fields directly
declared by this class/interface. The order in which they appear is
unspecified.| Modifier and Type | Method and Description |
|---|---|
void |
accept(IClassDefVisitor visitor,
java.lang.Object ctx) |
int |
add(Field_info field)
Adds a new Field_info descriptor to this collection.
|
java.lang.Object |
clone() |
int[] |
get(ClassDef cls,
java.lang.String name)
Returns an array of offsets for fields named 'name' (empty array if no
matching fields found).
|
Field_info |
get(int offset)
Returns
Field_info descriptor at a given offset. |
Field_info |
set(int offset,
Field_info field)
Replaces the Field_info descriptor at a given offset.
|
int |
size()
Returns the number of fields in this collection [can be 0].
|
writeInClassFormatField_info get(int offset)
Field_info descriptor at a given offset.offset - field offset [must be in [0, size()) range; input not checked]java.lang.IndexOutOfBoundsException - if 'offset' is outside of valid rangeint[] get(ClassDef cls, java.lang.String name)
cls - class definition providing the constant pool against which to
resolve names [may not be null]name - field name [null or empty will result in no matches]java.lang.IllegalArgumentException - if 'cls' is nullint size()
java.lang.Object clone()
void accept(IClassDefVisitor visitor, java.lang.Object ctx)
int add(Field_info field)
field - new field descriptor [may not be null]Field_info set(int offset, Field_info field)
offset - field offset [must be in [0, size()) range; input not checked]field - new field descriptor [may not be null]java.lang.IndexOutOfBoundsException - if 'offset' is outside of valid range