org.apache.bcel.classfile
Class FieldOrMethod
- Cloneable, Node, java.io.Serializable
public abstract class FieldOrMethod
implements Cloneable, Node
Abstract super class for fields and methods.
$Id: FieldOrMethod.java,v 1.3 2002/04/24 11:01:30 mdahm Exp $
getAccessFlags , getModifiers , isAbstract , isAbstract , isFinal , isFinal , isInterface , isInterface , isNative , isNative , isPrivate , isPrivate , isProtected , isProtected , isPublic , isPublic , isStatic , isStatic , isStrictfp , isStrictfp , isSynchronized , isSynchronized , isTransient , isTransient , isVolatile , isVolatile , setAccessFlags , setModifiers |
attributes_count
protected int attributes_count
name_index
protected int name_index
signature_index
protected int signature_index
FieldOrMethod
protected FieldOrMethod(DataInputStream file,
ConstantPool constant_pool)
throws IOException,
ClassFormatException
Construct object from file stream.
FieldOrMethod
protected FieldOrMethod(int access_flags,
int name_index,
int signature_index,
Attribute[] attributes,
ConstantPool constant_pool)
access_flags
- Access rights of methodname_index
- Points to field name in constant poolsignature_index
- Points to encoded signatureattributes
- Collection of attributesconstant_pool
- Array of constants
FieldOrMethod
protected FieldOrMethod(FieldOrMethod c)
Initialize from another object. Note that both objects use the same
references (shallow copy). Use clone() for a physical copy.
dump
public final void dump(DataOutputStream file)
throws IOException
Dump object to file stream on binary format.
file
- Output file stream
getAttributes
public final Attribute[] getAttributes()
- Collection of object attributes.
getConstantPool
public final ConstantPool getConstantPool()
- Constant pool used by this object.
getName
public final String getName()
- Name of object, i.e., method name or field name
getNameIndex
public final int getNameIndex()
- Index in constant pool of object's name.
getSignature
public final String getSignature()
- String representation of object's type signature (java style)
getSignatureIndex
public final int getSignatureIndex()
- Index in constant pool of field signature.
setAttributes
public final void setAttributes(Attribute[] attributes)
attributes
- Collection of object attributes.
setConstantPool
public final void setConstantPool(ConstantPool constant_pool)
constant_pool
- Constant pool to be used for this object.
setNameIndex
public final void setNameIndex(int name_index)
name_index
- Index in constant pool of object's name.
setSignatureIndex
public final void setSignatureIndex(int signature_index)
signature_index
- Index in constant pool of field signature.