fr.umlv.corosol.classfile.member
Interface JClassMember

All Superinterfaces:
JClassFileItem, JObject
All Known Implementing Classes:
DefaultJClassMember

public interface JClassMember
extends JClassFileItem

A JClassMember object represents a description of a class member. It correspond to a field_info or method_info structure in the specification of Class file.

Author:
Christophe Deleray

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 the array of attributes of this class member.
 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 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 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.
 
Methods inherited from interface fr.umlv.corosol.classfile.JClassFileItem
getConstantPool, readItem, setConstantPool, writeItem
 

Method Detail

getAccessFlags

int getAccessFlags()
Returns the mask of flags used to denote access permission to and properties of this class member.

Returns:
the access flags of the class

setAccessFlags

void setAccessFlags(int accessFlags)
Sets the mask of flags used to denote access permission to and properties of this class member.

Parameters:
accessFlags - the access flags of the class

getNameIndex

int getNameIndex()
Returns the index of the CONSTANT_Utf8_info constant pool entry, representing the name of this class member.

Returns:
the index of a constant pool entry representing the name of this class member

setNameIndex

void setNameIndex(int nameIndex)
Sets the index of the CONSTANT_Utf8_info constant pool entry, representing the name of this class member.

Parameters:
nameIndex - the index of a constant pool entry representing the name of this class member

getDescriptorIndex

int getDescriptorIndex()
Returns the index of the CONSTANT_Utf8_info constant pool entry, representing the descriptor of this class member.

Returns:
the index of a constant pool entry representing the descriptor of this class member

setDescriptorIndex

void setDescriptorIndex(int descriptorIndex)
Sets the index of the CONSTANT_Utf8_info constant pool entry, representing the descriptor of this class member.

Parameters:
descriptorIndex - the index of a constant pool entry representing the descriptor of this class member

getName

java.lang.String getName()
Returns the name of this class member.


getDescriptor

java.lang.String getDescriptor()
Returns the descriptor of this class member.

Returns:
the descriptor of this class member.

getAttributes

JAttribute[] getAttributes()
Returns the array of attributes of this class member.

Returns:
an array of attributes

setAttributes

void setAttributes(JAttribute[] attributes)
Sets the array of attributes of this class member.

Parameters:
attributes - an array of attributes

getAttribute

JAttribute getAttribute(java.lang.String name)
Returns the attribute whose name is specified.

Parameters:
name - the name of an attribute
Returns:
the attribute whose name is specified or null if it doesn't exist.

addAttribute

void addAttribute(JAttribute attribute)
Adds the specified attribute.

Parameters:
attribute - an attribute

removeAttribute

void removeAttribute(java.lang.String name)
Removes the attribute whose name is specified.

Parameters:
name - the name of an attribute

toString

java.lang.String toString()
Returns a string representation of this class member.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this class member