All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.ClassFile.HMethodSyn

java.lang.Object
   |
   +----harpoon.ClassFile.HMethod
           |
           +----harpoon.ClassFile.HMethodSyn

public class HMethodSyn
extends HMethod
An HMethodSyn provides information about, and access to, a single method on a class or interface. The reflected method may be a class method or an instance method (including an abstract method).

Version:
$Id: HMethodSyn.java,v 1.6 1998/10/21 21:50:24 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
HMember, HClass

Constructor Index

 o HMethodSyn(HClassSyn, HMethod)
Create a new method like the template, but in class parent.
 o HMethodSyn(HClassSyn, String, HClass[], HClass)
Create a new empty abstract method in the specified class with the specified parameter and return types that throws no checked exceptions.
 o HMethodSyn(HClassSyn, String, String)
Create a new empty abstract method in the specified class with the specified descriptor that throws no checked exceptions.
 o HMethodSyn(HMethod)
Create a new method based on a template.

Method Index

 o putCode(HCode)
Add a new code representation for this method, or replace a previously existing one.

An abstract method does not have code; thus putCode resets the abstract modifier on this HMethodSyn.

 o removeAllCode()
Remove all code representations for this method.
 o removeCode(String)
Remove a specified code representation for this method.
 o setExceptionType(int, HClass)
 o setExceptionTypes(HClass[])
 o setModifiers(int)
 o setParameterName(int, String)
 o setParameterNames(String[])
 o setParameterType(int, HClass)
Warning: use can cause method name conflicts in class.
 o setParameterTypes(HClass[])
Warning: use can cause method name conflicts in class.
 o setReturnType(HClass)
 o setSynthetic(boolean)

Constructors

 o HMethodSyn
 public HMethodSyn(HMethod template)
Create a new method based on a template. The new method will be added to the class containing the template method. The parent class of the template method must be an HClassSyn.

 o HMethodSyn
 public HMethodSyn(HClassSyn parent,
                   HMethod template)
Create a new method like the template, but in class parent. The new method will be added to class parent.

 o HMethodSyn
 public HMethodSyn(HClassSyn parent,
                   String name,
                   HClass paramTypes[],
                   HClass returnType)
Create a new empty abstract method in the specified class with the specified parameter and return types that throws no checked exceptions. Adding code to the method will make it non-abstract.

 o HMethodSyn
 public HMethodSyn(HClassSyn parent,
                   String name,
                   String descriptor)
Create a new empty abstract method in the specified class with the specified descriptor that throws no checked exceptions. Adding code to the method will make it non-abstract.

Methods

 o setModifiers
 public void setModifiers(int m)
 o setReturnType
 public void setReturnType(HClass returnType)
 o setParameterTypes
 public void setParameterTypes(HClass parameterTypes[])
Warning: use can cause method name conflicts in class.

 o setParameterType
 public void setParameterType(int which,
                              HClass type)
Warning: use can cause method name conflicts in class.

 o setParameterNames
 public void setParameterNames(String parameterNames[])
 o setParameterName
 public void setParameterName(int which,
                              String name)
 o setExceptionTypes
 public void setExceptionTypes(HClass exceptionTypes[])
 o setExceptionType
 public void setExceptionType(int which,
                              HClass type)
 o setSynthetic
 public void setSynthetic(boolean isSynthetic)
 o putCode
 public void putCode(HCode codeobj)
Add a new code representation for this method, or replace a previously existing one.

An abstract method does not have code; thus putCode resets the abstract modifier on this HMethodSyn.

Overrides:
putCode in class HMethod
 o removeCode
 public void removeCode(String codetype)
Remove a specified code representation for this method. If there are no code representations left, sets the abstract modifier.

 o removeAllCode
 public void removeAllCode()
Remove all code representations for this method. Sets the abstract modifier.


All Packages  Class Hierarchy  This Package  Previous  Next  Index