|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public 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 rangepublic int[] 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 nullpublic int size()
public java.lang.Object clone()
public void accept(IClassDefVisitor visitor, java.lang.Object ctx)
public int add(Field_info field)
field
- new field descriptor [may not be null]
public 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 |