All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.ClassFile.Raw.FieldInfo

java.lang.Object
   |
   +----harpoon.ClassFile.Raw.FieldInfo

public class FieldInfo
extends Object
Each field is described by a variable-length field_info structure.

Version:
$Id: FieldInfo.java,v 1.14 1998/10/11 03:01:12 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
ClassFile, HField

Variable Index

 o access_flags
Access permissions and properties of the field.
 o attributes
A field can have any number of attributes associated with it.
 o descriptor_index
The value of the descriptor_index item must be a valid index into the constant_pool table.
 o name_index
The value of the name_index item must be a valid index into the constant_pool table.
 o parent
ClassFile in which this field information is found.

Constructor Index

 o FieldInfo(ClassFile, AccessFlags, int, int, Attribute[])
Constructor.

Method Index

 o descriptor()
 o descriptor_index()
 o name()
 o name_index()
 o print(PrintWriter, int)
Pretty-print this field_info structure.
 o read(ClassFile, ClassDataInputStream)
Read a single FieldInfo item from an input class bytecode file.
 o write(ClassDataOutputStream)
Writes a FieldInfo item out to a class bytecode file.

Variables

 o parent
 protected ClassFile parent
ClassFile in which this field information is found.

 o access_flags
 public AccessFlags access_flags
Access permissions and properties of the field.

 o name_index
 public int name_index
The value of the name_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info structure which must represent a valid Java field name stored as a simple (not fully qualified) name, that is, as a Java identifier.

 o descriptor_index
 public int descriptor_index
The value of the descriptor_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info structure which must represent a valid Java field descriptor.

 o attributes
 public Attribute attributes[]
A field can have any number of attributes associated with it.

The only attributed defined for the attributes table of a field_info structure by this specification is the ConstantValue attribute.

Constructors

 o FieldInfo
 public FieldInfo(ClassFile parent,
                  AccessFlags access_flags,
                  int name_index,
                  int descriptor_index,
                  Attribute attributes[])
Constructor.

Methods

 o read
 public void read(ClassFile p,
                  ClassDataInputStream in) throws IOException
Read a single FieldInfo item from an input class bytecode file.

 o write
 public void write(ClassDataOutputStream out) throws IOException
Writes a FieldInfo item out to a class bytecode file.

 o name_index
 public ConstantUtf8 name_index()
 o descriptor_index
 public ConstantUtf8 descriptor_index()
 o name
 public String name()
 o descriptor
 public String descriptor()
 o print
 public void print(PrintWriter pw,
                   int indent)
Pretty-print this field_info structure.


All Packages  Class Hierarchy  This Package  Previous  Next  Index