All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.ClassFile.Raw.MethodInfo

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

public class MethodInfo
extends Object
Each method, and each instance initialization method <init>, is described by a variable-length method_info structure.

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

Variable Index

 o access_flags
Access permissions and properties of the method.
 o attributes
A method can have any number of optional 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 method information is found.

Constructor Index

 o MethodInfo(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 method_info structure.
 o read(ClassFile, ClassDataInputStream)
Read a single MethodInfo item from an input class bytecode file.
 o write(ClassDataOutputStream)
Writes a MethodInfo item out to a class bytecode file.

Variables

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

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

 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 representing either one of the special internal method names, either <init> or <clint>, or a valid Java method name, stored as a simple (not fully qualified) name.

 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 representing a valid Java method descriptor.

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

The only attributes defined by this specification for the attributes table of a method_info structure are the Code and Exceptions attributes.

Constructors

 o MethodInfo
 public MethodInfo(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 MethodInfo item from an input class bytecode file.

 o write
 public void write(ClassDataOutputStream out) throws IOException
Writes a MethodInfo 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 method_info structure.


All Packages  Class Hierarchy  This Package  Previous  Next  Index