|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--joie.Member
Defines a Member of a class as it is represented in the classfile. field_info/method_info { u2 access_flags; u2 name_index; u2 descriptor_index; u2 attributes_count; attribute_info attributes[attributes_count]; }
| Field Summary | |
protected Modifiers |
access_flags
|
protected int |
acount
|
protected ShortCount |
attr_count
|
protected Attribute[] |
attribs
|
protected ClassInfo |
cinfo
|
protected ConstantPool |
cpool
|
protected java.lang.String |
desc
|
protected int |
desc_index
|
protected java.lang.String |
name
|
protected int |
name_index
|
| Fields inherited from interface joie.io.FilterObject |
APPENDED, CLEAN, DIRTY, DIRTY_IN_PLACE, DIRTY_SAME_SIZE |
| Constructor Summary | |
protected |
Member()
Protected to prevent from unwanted instantiation. |
protected |
Member(java.lang.String name,
java.lang.String descriptor)
Creates a new member with the given name and descriptor. |
| Method Summary | |
void |
addAttribute(Attribute attr)
|
void |
assignClassInfo(ClassInfo classinfo)
Assigns a new ClassInfo reference to the class member. |
Attribute[] |
getAttributes()
|
java.lang.String |
getClassName()
|
protected int |
getDescIndex()
Returns the desc_index. |
java.lang.String |
getDescriptor()
Returns the descriptor of the Member. |
Modifiers |
getModifiers()
|
java.lang.String |
getName()
Returns the name of the Member. |
protected int |
getNameIndex()
Returns the name_index. |
int |
getStatus()
|
protected void |
init()
Initialized a new object. |
void |
readFromByteStream(ByteStream in)
Reads the Member information from the input stream. |
protected void |
rebind()
Assigns new indexes into the Constant Pool depending on the currently set name and description. |
void |
resolve()
Resolves the indexes. |
void |
serialize(ByteStream bs)
|
void |
serializeAppend(ByteStream bs)
|
void |
serializeInPlace(ByteStream bs)
|
protected void |
setClassInfo(ClassInfo cinfo)
Sets the new ClassInfo reference. |
java.lang.String |
toString()
|
static void |
write(ByteStream out,
java.lang.Object[] members)
Writes all member objects (fields or methods) in the given array to the output stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Modifiers access_flags
protected int name_index
protected int desc_index
protected ShortCount attr_count
protected int acount
protected Attribute[] attribs
protected ClassInfo cinfo
protected ConstantPool cpool
protected java.lang.String name
protected java.lang.String desc
| Constructor Detail |
protected Member()
protected Member(java.lang.String name,
java.lang.String descriptor)
name - the member's namedescriptor - the member's descriptor| Method Detail |
public void readFromByteStream(ByteStream in)
throws java.io.IOException
in - the input stream
java.io.IOException - if an I/O Error occurs
public static void write(ByteStream out,
java.lang.Object[] members)
throws java.io.IOException
out - the output streammembers - the array of Member objects
java.io.IOException - if an I/O error occurspublic void addAttribute(Attribute attr)
public void assignClassInfo(ClassInfo classinfo)
classinfo - the ClassInfo referenceprotected void setClassInfo(ClassInfo cinfo)
cinfo - the ClassInfoprotected void init()
protected void rebind()
public void resolve()
JOIEException - if the name can not be resolvedprotected int getNameIndex()
public java.lang.String getName()
JOIEException - if the index is wrongprotected int getDescIndex()
public java.lang.String getDescriptor()
JOIEException - if the index is wrongpublic java.lang.String getClassName()
public Modifiers getModifiers()
public Attribute[] getAttributes()
public java.lang.String toString()
toString in class java.lang.Objectpublic void serialize(ByteStream bs)
serialize in interface FilterObjectpublic void serializeAppend(ByteStream bs)
serializeAppend in interface FilterObjectpublic void serializeInPlace(ByteStream bs)
serializeInPlace in interface FilterObjectpublic int getStatus()
getStatus in interface FilterObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||