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
-
HMethodSyn(HClassSyn, HMethod)
- Create a new method like the
template
,
but in class parent
.
-
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.
-
HMethodSyn(HClassSyn, String, String)
- Create a new empty abstract method in the specified class
with the specified descriptor
that throws no checked exceptions.
-
HMethodSyn(HMethod)
- Create a new method based on a template.
-
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
.
-
removeAllCode()
- Remove all code representations for this method.
-
removeCode(String)
- Remove a specified code representation for this method.
-
setExceptionType(int, HClass)
-
-
setExceptionTypes(HClass[])
-
-
setModifiers(int)
-
-
setParameterName(int, String)
-
-
setParameterNames(String[])
-
-
setParameterType(int, HClass)
- Warning: use can cause method name conflicts in class.
-
setParameterTypes(HClass[])
- Warning: use can cause method name conflicts in class.
-
setReturnType(HClass)
-
-
setSynthetic(boolean)
-
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
.
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
.
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.
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.
setModifiers
public void setModifiers(int m)
setReturnType
public void setReturnType(HClass returnType)
setParameterTypes
public void setParameterTypes(HClass parameterTypes[])
- Warning: use can cause method name conflicts in class.
setParameterType
public void setParameterType(int which,
HClass type)
- Warning: use can cause method name conflicts in class.
setParameterNames
public void setParameterNames(String parameterNames[])
setParameterName
public void setParameterName(int which,
String name)
setExceptionTypes
public void setExceptionTypes(HClass exceptionTypes[])
setExceptionType
public void setExceptionType(int which,
HClass type)
setSynthetic
public void setSynthetic(boolean isSynthetic)
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
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.
removeAllCode
public void removeAllCode()
- Remove all code representations for this method.
Sets the
abstract
modifier.
All Packages Class Hierarchy This Package Previous Next Index