All Packages Class Hierarchy This Package Previous Next Index
Class harpoon.ClassFile.HCode
java.lang.Object
|
+----harpoon.ClassFile.HCode
- public abstract class HCode
- extends Object
HCode
is an abstract class that all views of a particular
method's executable code should extend.
An HCode
corresponds roughly to a "list of instructions".
- Version:
- $Id: HCode.java,v 1.12 1998/11/10 03:31:38 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
- See Also:
- HMethod, HCodeElement, Code, Instr
-
HCode()
-
-
clone(HMethod)
- Clone this HCode, possibly moving it to a different method.
-
getElements()
- Return an ordered list of the component objects making up this
code view.
-
getElementsE()
- Return an Enumeration of the component objects making up this
code view.
-
getLeafElements()
- Return the 'leaves' of this code view; that is,
the elements with no successors.
-
getMethod()
- Return the
HMethod
to which this HCode
belongs.
-
getName()
- Return the name of this code view.
-
getRootElement()
- Return the 'root' element of this code view.
-
print(PrintWriter)
- Pretty-print this code view.
-
toString()
- Returns a human-readable representation of this
HCode
.
HCode
public HCode()
getMethod
public abstract HMethod getMethod()
- Return the
HMethod
to which this HCode
belongs.
getName
public abstract String getName()
- Return the name of this code view.
The default bytecode view is named
"bytecode"
.
It is suggested that additional views be named in a similarly
human-friendly fashion.
getElements
public abstract HCodeElement[] getElements()
- Return an ordered list of the component objects making up this
code view. If there is a 'root' to the code view, it should
occupy index 0 of the
HCodeElement
array.
- See Also:
- Instr
getElementsE
public abstract Enumeration getElementsE()
- Return an Enumeration of the component objects making up this
code view. If there is a 'root' to the code view, it should
be the first element enumerated.
- See Also:
- Instr
getRootElement
public HCodeElement getRootElement()
- Return the 'root' element of this code view.
- Returns:
- root of the code view, or
null
if this notion
is not applicable.
getLeafElements
public HCodeElement[] getLeafElements()
- Return the 'leaves' of this code view; that is,
the elements with no successors.
- Returns:
- leaves of the code view, or
null
if this notion
is not applicable.
clone
public HCode clone(HMethod newMethod) throws CloneNotSupportedException
- Clone this HCode, possibly moving it to a different method.
Throws CloneNotSupportedException if not overridden.
- Throws: CloneNotSupportedException
- if it is not possible to clone
this
HCode
.
print
public void print(PrintWriter pw)
- Pretty-print this code view.
toString
public String toString()
- Returns a human-readable representation of this
HCode
.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index