All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.ClassFile.Raw.Constant.ConstantMethodref

java.lang.Object
   |
   +----harpoon.ClassFile.Raw.Constant.Constant
           |
           +----harpoon.ClassFile.Raw.Constant.ConstantMethodref

public class ConstantMethodref
extends Constant
The CONSTANT_Methodref structure represents a method.

Version:
$Id: ConstantMethodref.java,v 1.12 1998/10/11 03:01:15 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Constant, ConstantFieldref, ConstantInterfaceMethodref

Variable Index

 o class_index
The value of the class_index item must be a valid index into the constant_pool table of the parent.
 o name_and_type_index
The value of the name_and_type_index item must be a valid index into the constant_pool table of the parent.

Constructor Index

 o ConstantMethodref(ClassFile, int, int)
Constructor.

Method Index

 o class_index()
 o name_and_type_index()
 o toString()
Create a human-readable representation of this constant.
 o write(ClassDataOutputStream)
Write to a bytecode file.

Variables

 o class_index
 public int class_index
The value of the class_index item must be a valid index into the constant_pool table of the parent. The constant_pool entry at that index must be a CONSTANT_Class_info structure representing the class or interface type that contains the declaration of the method.

The class_index item of a CONSTANT_Methodref must be a class type, not an interface type.

 o name_and_type_index
 public int name_and_type_index
The value of the name_and_type_index item must be a valid index into the constant_pool table of the parent. The constant_pool entry at that index must be a CONSTANT_NameAndType_info structure. This constant_pool entry indicates the name and descriptor of the method.

If the name of the method of a CONSTANT_Methodref_info begins with a '<' ('<'), then the name must be one of the special internal methods, either <init> or <clinit>. In this case, the method must return no value.

Constructors

 o ConstantMethodref
 public ConstantMethodref(ClassFile parent,
                          int class_index,
                          int name_and_type_index)
Constructor.

Methods

 o write
 public void write(ClassDataOutputStream out) throws IOException
Write to a bytecode file.

Overrides:
write in class Constant
 o class_index
 public ConstantClass class_index()
 o name_and_type_index
 public ConstantNameAndType name_and_type_index()
 o toString
 public String toString()
Create a human-readable representation of this constant.

Overrides:
toString in class Constant

All Packages  Class Hierarchy  This Package  Previous  Next  Index