public abstract class Term_c extends Node_c implements Term, TermOps
Term
represents any Java expression or statement on which
dataflow can be performed.Term.Instance
Modifier and Type | Field and Description |
---|---|
protected SubtypeSet |
exceptions |
protected boolean |
reachable |
Constructor and Description |
---|
Term_c(Position pos) |
Term_c(Position pos,
Ext ext) |
Modifier and Type | Method and Description |
---|---|
abstract <T> java.util.List<T> |
acceptCFG(CFGBuilder<?> v,
java.util.List<T> succs)
Visit this term in evaluation order, calling v.edge() for each successor
in succs, if data flows on that edge.
|
Node |
exceptionCheck(ExceptionChecker ec)
Check that exceptions are properly propagated throughout the AST.
|
SubtypeSet |
exceptions()
List of Types with all exceptions possibly thrown by this term.
|
protected <N extends Term_c> |
exceptions(N n,
SubtypeSet exceptions) |
Term |
exceptions(SubtypeSet exceptions) |
Node |
extRewrite(ExtensionRewriter rw)
Rewrite the AST for the compilation in this language.
|
abstract Term |
firstChild()
Return the first direct subterm performed when evaluating this term.
|
static <T extends Term,U extends T,V extends T> |
listChild(java.util.List<U> l,
V alt)
Utility function to get the first entry of a list, or else alt.
|
boolean |
reachable()
Returns true if the term is reachable.
|
Term |
reachable(boolean reachable)
Set the reachability of this term.
|
protected <N extends Term_c> |
reachable(N n,
boolean reachable) |
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copy, copyIfNeeded, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, dump, enterChildScope, enterScope, error, error, error, exceptionCheckEnter, ext, ext, ext, ext, extRewriteEnter, isDisambiguated, isTypeChecked, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, toString, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitChildren, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheckEnter, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList
protected boolean reachable
protected SubtypeSet exceptions
public boolean reachable()
Term
reachable
in interface Term
ReachChecker
public Term reachable(boolean reachable)
Term
protected <N extends Term_c> N reachable(N n, boolean reachable)
public SubtypeSet exceptions()
Term
polyglot.ast.NodeOps.throwTypes()
is similar, but exceptions
are not propagated to the containing node.exceptions
in interface Term
public Term exceptions(SubtypeSet exceptions)
exceptions
in interface Term
protected <N extends Term_c> N exceptions(N n, SubtypeSet exceptions)
public static <T extends Term,U extends T,V extends T> T listChild(java.util.List<U> l, V alt)
public Node exceptionCheck(ExceptionChecker ec) throws SemanticException
NodeOps
leave()
method of the
visitor. The method should perform work that should be done
after visiting the children of the node. The method may return
this
or a new copy of the node which will be
installed as a child of the node's parent.exceptionCheck
in interface NodeOps
exceptionCheck
in class Node_c
ec
- The visitor.SemanticException
public Node extRewrite(ExtensionRewriter rw) throws SemanticException
NodeOps
leave()
method of the
visitor. The method should perform work that should be done
after visiting the children of the node. The method may return
this
or a new copy of the node which will be
installed as a child of the node's parent.extRewrite
in interface NodeOps
extRewrite
in class Node_c
rw
- The visitor.SemanticException
public abstract Term firstChild()
TermOps
firstChild
in interface TermOps
public abstract <T> java.util.List<T> acceptCFG(CFGBuilder<?> v, java.util.List<T> succs)
TermOps