|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vladium.jcd.cls.FieldCollection
Field Summary | |
private java.util.List |
m_fields
|
Constructor Summary | |
(package private) |
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)
IFieldCollection
Field_info
descriptor at a given offset.
get
in interface IFieldCollection
offset
- field offset [must be in [0, size()) range; input not checked]
public int[] get(ClassDef cls, java.lang.String name)
IFieldCollection
get
in interface IFieldCollection
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]
public int size()
IFieldCollection
size
in interface IFieldCollection
public java.lang.Object clone()
clone
in interface IFieldCollection
public void writeInClassFormat(UDataOutputStream out) throws java.io.IOException
writeInClassFormat
in interface IClassFormatOutput
java.io.IOException
public void accept(IClassDefVisitor visitor, java.lang.Object ctx)
accept
in interface IFieldCollection
public int add(Field_info field)
IFieldCollection
add
in interface IFieldCollection
field
- new field descriptor [may not be null]
public Field_info set(int offset, Field_info field)
IFieldCollection
set
in interface IFieldCollection
offset
- 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 |