|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFieldCollection
An abstraction of the 'fields' component of .class format. The contents
are Field_info
structures corresponding to all fields directly
declared by this class/interface. The order in which they appear is
unspecified.
Method Summary | |
---|---|
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]. |
Methods inherited from interface com.vladium.jcd.compiler.IClassFormatOutput |
---|
writeInClassFormat |
Method Detail |
---|
Field_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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |