All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class de.fub.bytecode.classfile.FieldOrMethod

java.lang.Object
   |
   +----de.fub.bytecode.classfile.AccessFlags
           |
           +----de.fub.bytecode.classfile.FieldOrMethod

public abstract class FieldOrMethod
extends AccessFlags
implements Constants, Cloneable
Abstract super class for fields and methods.

Version:
$Id: FieldOrMethod.java,v 1.4 1999/06/02 13:17:52 dahm Exp $
Author:
M. Dahm

Variable Index

 o attributes
 o attributes_count
 o constant_pool
 o name_index
 o signature_index

Constructor Index

 o FieldOrMethod(DataInputStream, ConstantPool)
Construct object from file stream.
 o FieldOrMethod(FieldOrMethod)
Initialize from another object.
 o FieldOrMethod(int, int, int, Attribute[], ConstantPool)

Method Index

 o copy_(ConstantPool)
 o dump(DataOutputStream)
Dump object to file stream on binary format.
 o getAttributes()
 o getConstantPool()
 o getName()
 o getNameIndex()
 o getSignature()
 o getSignatureIndex()
 o setAttributes(Attribute[])
 o setConstantPool(ConstantPool)
 o setNameIndex(int)
 o setSignatureIndex(int)

Variables

 o name_index
 protected int name_index
 o signature_index
 protected int signature_index
 o attributes_count
 protected int attributes_count
 o attributes
 protected Attribute attributes[]
 o constant_pool
 protected ConstantPool constant_pool

Constructors

 o 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.

 o FieldOrMethod
 protected FieldOrMethod(DataInputStream file,
                         ConstantPool constant_pool) throws IOException, ClassFormatError
Construct object from file stream.

Parameters:
file - Input stream
 o FieldOrMethod
 protected FieldOrMethod(int access_flags,
                         int name_index,
                         int signature_index,
                         Attribute attributes[],
                         ConstantPool constant_pool)
Parameters:
access_flags - Access rights of method
name_index - Points to field name in constant pool
signature_index - Points to encoded signature
attributes - Collection of attributes
constant_pool - Array of constants

Methods

 o dump
 public final void dump(DataOutputStream file) throws IOException
Dump object to file stream on binary format.

Parameters:
file - Output file stream
 o getAttributes
 public final Attribute[] getAttributes()
Returns:
Collection of object attributes.
 o setAttributes
 public final void setAttributes(Attribute attributes[])
Parameters:
attributes - Collection of object attributes.
 o getConstantPool
 public final ConstantPool getConstantPool()
Returns:
Constant pool used by this object.
 o setConstantPool
 public final void setConstantPool(ConstantPool constant_pool)
Parameters:
constant_pool - Constant pool to be used for this object.
 o getNameIndex
 public final int getNameIndex()
Returns:
Index in constant pool of object's name.
 o setNameIndex
 public final void setNameIndex(int name_index)
Parameters:
name_index - Index in constant pool of object's name.
 o getSignatureIndex
 public final int getSignatureIndex()
Returns:
Index in constant pool of field signature.
 o setSignatureIndex
 public final void setSignatureIndex(int signature_index)
Parameters:
signature_index - Index in constant pool of field signature.
 o getName
 public final String getName()
Returns:
Name of object, i.e. method name or field name
 o getSignature
 public final String getSignature()
Returns:
String representation of object's type signature (java style)
 o copy_
 protected FieldOrMethod copy_(ConstantPool constant_pool)
Returns:
deep copy of this field

All Packages  Class Hierarchy  This Package  Previous  Next  Index