|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.ClassFile.HCode<Tree>
harpoon.IR.Tree.Code
harpoon.IR.Tree.CanonicalTreeCode
public class CanonicalTreeCode
The CanonicalTreeCode
codeview is the same as
the TreeCode
codeview, except for the fact that it
does not allow ESEQ
objects to be part of its representation.
There is seldom a compelling reason not to use the canonical tree view,
as ESEQ
s complicate analysis, while providing no real benefits.
The CanonicalTreeCode
is based around Andrew Appel's
canonical tree form.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class harpoon.IR.Tree.Code |
---|
Code.TreeFactory |
Nested classes/interfaces inherited from class harpoon.ClassFile.HCode |
---|
HCode.PrintCallback<HCE extends HCodeElement> |
Field Summary | |
---|---|
static String |
codename
The getName() method return codename ,
which is "canonical-tree" for this Code . |
Fields inherited from class harpoon.IR.Tree.Code |
---|
frame, parent, tf, tree |
Method Summary | |
---|---|
HCodeAndMaps<Tree> |
clone(HMethod newMethod,
Frame frame)
Clone this code representation. |
static HCodeFactory |
codeFactory(Frame frame)
Return a code factory for CanonicalTreeCode ,
using the default code factory for TreeCode |
static HCodeFactory |
codeFactory(HCodeFactory hcf,
Frame frame)
Return a code factory for CanonicalTreeCode , given a
code factory for TreeCode . |
String |
getName()
Return the name of this code view. |
TreeDerivation |
getTreeDerivation()
Returns a TreeDerivation object for the
generated Tree form. |
boolean |
isCanonical()
Returns true if this codeview is a canonical representation |
Methods inherited from class harpoon.IR.Tree.Code |
---|
clone, cloneHelper, elementArrayFactory, getElements, getElementsI, getFrame, getGrapher, getLeafElements, getMethod, getRootElement, getUseDefer, print, remove |
Methods inherited from class harpoon.ClassFile.HCode |
---|
clone, elementIndexer, getElementsL, print, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String codename
getName()
method return codename
,
which is "canonical-tree" for this Code
.
Method Detail |
---|
public TreeDerivation getTreeDerivation()
TreeDerivation
object for the
generated Tree
form.
getTreeDerivation
in class Code
public HCodeAndMaps<Tree> clone(HMethod newMethod, Frame frame)
clone
in class Code
public String getName()
getName
in class Code
"canonical-tree"
.public boolean isCanonical()
Code
isCanonical
in class Code
public static HCodeFactory codeFactory(HCodeFactory hcf, Frame frame)
CanonicalTreeCode
, given a
code factory for TreeCode
.
hcf
is a code factory for
TreeCode
, then creates and returns a code
factory for CanonicalTreeCode
. Else passes
hcf
to
TreeCode.codeFactory()
, and reattempts to
create a code factory for CanonicalTreeCode
from the
code factory returned by TreeCode
.
TreeCode.codeFactory(HCodeFactory, Frame)
public static HCodeFactory codeFactory(Frame frame)
CanonicalTreeCode
,
using the default code factory for TreeCode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |