|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vladium.jcd.cls.FieldCollection
final class FieldCollection
| Field Summary | |
|---|---|
private java.util.List |
m_fields
|
| Constructor Summary | |
|---|---|
FieldCollection(int capacity)
|
|
| 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()
Performs a deep copy. |
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]. |
void |
writeInClassFormat(UDataOutputStream out)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.List m_fields
| Constructor Detail |
|---|
FieldCollection(int capacity)
| Method Detail |
|---|
public Field_info get(int offset)
IFieldCollectionField_info descriptor at a given offset.
get in interface IFieldCollectionoffset - field offset [must be in [0, size()) range; input not checked]
public int[] get(ClassDef cls,
java.lang.String name)
IFieldCollection
get in interface IFieldCollectioncls - 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]
public int size()
IFieldCollection
size in interface IFieldCollectionpublic java.lang.Object clone()
clone in interface IFieldCollectionclone in class java.lang.Object
public void writeInClassFormat(UDataOutputStream out)
throws java.io.IOException
writeInClassFormat in interface IClassFormatOutputjava.io.IOException
public void accept(IClassDefVisitor visitor,
java.lang.Object ctx)
accept in interface IFieldCollectionpublic int add(Field_info field)
IFieldCollection
add in interface IFieldCollectionfield - new field descriptor [may not be null]
public Field_info set(int offset,
Field_info field)
IFieldCollection
set in interface IFieldCollectionoffset - field offset [must be in [0, size()) range; input not checked]field - new field descriptor [may not be null]
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||