|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfr.umlv.corosol.classfile.member.impl.DefaultJClassMember
public class DefaultJClassMember
The default implementation of JClassMember interface.
| Constructor Summary | |
|---|---|
DefaultJClassMember()
The default constructor. |
|
DefaultJClassMember(JConstantPool cpool,
int accessFlags,
int nameIndex,
int descriptorIndex,
JAttribute[] attributes)
Creates a new DefaultJClassMember object. |
|
| Method Summary | |
|---|---|
void |
addAttribute(JAttribute attribute)
Adds the specified attribute. |
int |
getAccessFlags()
Returns the mask of flags used to denote access permission to and properties of this class member. |
JAttribute |
getAttribute(java.lang.String name)
Returns the attribute whose name is specified. |
JAttribute[] |
getAttributes()
Returns an array of attributes of this class member. |
JConstantPool |
getConstantPool()
Returns the constant pool of this classfile item. |
java.lang.String |
getDescriptor()
Returns the descriptor of this class member. |
int |
getDescriptorIndex()
Returns the index of the CONSTANT_Utf8_info constant pool entry, representing the descriptor of this class member. |
java.lang.String |
getName()
Returns the name of this class member. |
int |
getNameIndex()
Returns the index of the CONSTANT_Utf8_info constant pool entry, representing the name of this class member. |
void |
readItem(JClassFileInput in)
Extracts the data of this classfile part from the specified input stream. |
void |
removeAttribute(java.lang.String name)
Removes the attribute whose name is specified. |
void |
setAccessFlags(int accessFlags)
Sets the mask of flags used to denote access permission to and properties of this class member. |
void |
setAttributes(JAttribute[] attributes)
Sets the array of attributes of this class member. |
void |
setConstantPool(JConstantPool constantPool)
Sets the constant pool of this classfile item. |
void |
setDescriptorIndex(int descriptorIndex)
Sets the index of the CONSTANT_Utf8_info constant pool entry, representing the descriptor of this class member. |
void |
setNameIndex(int nameIndex)
Sets the index of the CONSTANT_Utf8_info constant pool entry, representing the name of this class member. |
java.lang.String |
toString()
Returns a string representation of this class member. |
void |
writeItem(JClassFileOutput out)
Writes the data of this classfile part into a file via the specified output stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultJClassMember()
public DefaultJClassMember(JConstantPool cpool,
int accessFlags,
int nameIndex,
int descriptorIndex,
JAttribute[] attributes)
cpool - the constant poolaccessFlags - the access flagsnameIndex - an index of a Constant_UTF8_info constant pool entrydescriptorIndex - an index of a Constant_UTF8_info constant pool
entryattributes - an array of attributes| Method Detail |
|---|
public int getAccessFlags()
getAccessFlags in interface JClassMemberpublic void setAccessFlags(int accessFlags)
setAccessFlags in interface JClassMemberaccessFlags - the access flags of the classpublic int getNameIndex()
getNameIndex in interface JClassMemberpublic void setNameIndex(int nameIndex)
setNameIndex in interface JClassMembernameIndex - the index of a constant pool entry representing the
name of this class memberpublic int getDescriptorIndex()
getDescriptorIndex in interface JClassMemberpublic void setDescriptorIndex(int descriptorIndex)
setDescriptorIndex in interface JClassMemberdescriptorIndex - the index of a constant pool entry representing
the descriptor of this class memberpublic java.lang.String getName()
getName in interface JClassMemberpublic java.lang.String getDescriptor()
getDescriptor in interface JClassMemberpublic JAttribute[] getAttributes()
getAttributes in interface JClassMemberpublic void setAttributes(JAttribute[] attributes)
setAttributes in interface JClassMemberattributes - an array of attributespublic java.lang.String toString()
toString in interface JClassMembertoString in class java.lang.Object
public void readItem(JClassFileInput in)
throws java.io.IOException
readItem in interface JClassFileItemin - an input stream
java.io.IOException - if an I/O error occurs when reading the
datas corresponding to this class member description
public void writeItem(JClassFileOutput out)
throws java.io.IOException
writeItem in interface JClassFileItemout - a class file output stream
java.io.IOException - if an I/O error occurs when
writing into the classfilepublic JAttribute getAttribute(java.lang.String name)
getAttribute in interface JClassMembername - the name of an attribute
public void addAttribute(JAttribute attribute)
addAttribute in interface JClassMemberattribute - an attributepublic void removeAttribute(java.lang.String name)
removeAttribute in interface JClassMembername - the name of an attributepublic JConstantPool getConstantPool()
getConstantPool in interface JClassFileItempublic void setConstantPool(JConstantPool constantPool)
setConstantPool in interface JClassFileItemconstantPool - the constant Pool
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||