|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpolyglot.ext.jl.ast.Node_c
polyglot.ext.jl.ast.Term_c
polyglot.ext.jl.ast.ClassBody_c
public class ClassBody_c
A ClassBody represents the body of a class or interface
declaration or the body of an anonymous class.
| Field Summary | |
|---|---|
protected java.util.List |
members
|
| Fields inherited from class polyglot.ext.jl.ast.Term_c |
|---|
exceptions, reachable |
| Fields inherited from class polyglot.ext.jl.ast.Node_c |
|---|
del, ext, position |
| Constructor Summary | |
|---|---|
ClassBody_c(Position pos,
java.util.List members)
|
|
| Method Summary | |
|---|---|
java.util.List |
acceptCFG(CFGBuilder v,
java.util.List succs)
Visit this term in evaluation order. |
ClassBody |
addMember(ClassMember member)
Add a member to the class, returning a new node. |
Node |
disambiguate(AmbiguityRemover ar)
Remove any remaining ambiguities from the AST. |
NodeVisitor |
disambiguateEnter(AmbiguityRemover ar)
Remove any remaining ambiguities from the AST. |
protected void |
duplicateConstructorCheck(TypeChecker tc)
|
protected void |
duplicateFieldCheck(TypeChecker tc)
|
protected void |
duplicateMemberClassCheck(TypeChecker tc)
|
protected void |
duplicateMethodCheck(TypeChecker tc)
|
Term |
entry()
Return the first (sub)term performed when evaluating this term. |
NodeVisitor |
exceptionCheckEnter(ExceptionChecker ec)
Check that exceptions are properly propagated throughout the AST. |
protected boolean |
isSameMethod(TypeSystem ts,
MethodInstance mi,
MethodInstance mj)
|
java.util.List |
members()
List of the class's members. |
ClassBody |
members(java.util.List members)
Set the class's members. |
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given CodeWriter. |
protected ClassBody_c |
reconstruct(java.util.List members)
|
java.lang.String |
toString()
|
Node |
typeCheck(TypeChecker tc)
Type check the AST. |
Node |
visitChildren(NodeVisitor v)
Visit the children of the node. |
| Methods inherited from class polyglot.ext.jl.ast.Term_c |
|---|
exceptionCheck, exceptions, exceptions, listEntry, reachable, reachable |
| Methods inherited from class polyglot.ext.jl.ast.Node_c |
|---|
addDecls, addMembers, addMembersEnter, addMembersOverride, buildTypes, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguateOverride, dump, enterScope, enterScope, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface polyglot.ast.Term |
|---|
exceptions, exceptions, reachable, reachable |
| Methods inherited from interface polyglot.ast.Node |
|---|
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList |
| Methods inherited from interface polyglot.ast.JL |
|---|
init, node |
| Methods inherited from interface polyglot.ast.NodeOps |
|---|
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, enterScope, enterScope, exceptionCheck, throwTypes, translate, typeCheckEnter |
| Methods inherited from interface polyglot.util.Copy |
|---|
copy |
| Field Detail |
|---|
protected java.util.List members
| Constructor Detail |
|---|
public ClassBody_c(Position pos,
java.util.List members)
| Method Detail |
|---|
public java.util.List members()
ClassBody
members in interface ClassBodyClassMember.public ClassBody members(java.util.List members)
ClassBody
members in interface ClassBodymembers - A list of ClassMember.public ClassBody addMember(ClassMember member)
ClassBody
addMember in interface ClassBodyprotected ClassBody_c reconstruct(java.util.List members)
public Node visitChildren(NodeVisitor v)
NodeOps
visitChildren in interface NodeOpsvisitChildren in class Node_cv - The visitor that will traverse/rewrite the AST.
this.
public NodeVisitor disambiguateEnter(AmbiguityRemover ar)
throws SemanticException
NodeOpsenter() method of the
visitor. The * method should perform work that should be done
before visiting the children of the node. The method may return
this or a new copy of the node on which
visitChildren() and leave() will be
invoked.
disambiguateEnter in interface NodeOpsdisambiguateEnter in class Node_car - The visitor which disambiguates.
SemanticException
public Node disambiguate(AmbiguityRemover ar)
throws SemanticException
NodeOpsleave() 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.
disambiguate in interface NodeOpsdisambiguate in class Node_car - The visitor which disambiguates.
SemanticExceptionpublic java.lang.String toString()
toString in class Node_c
protected void duplicateFieldCheck(TypeChecker tc)
throws SemanticException
SemanticException
protected void duplicateConstructorCheck(TypeChecker tc)
throws SemanticException
SemanticException
protected void duplicateMethodCheck(TypeChecker tc)
throws SemanticException
SemanticException
protected void duplicateMemberClassCheck(TypeChecker tc)
throws SemanticException
SemanticException
protected boolean isSameMethod(TypeSystem ts,
MethodInstance mi,
MethodInstance mj)
public Node typeCheck(TypeChecker tc)
throws SemanticException
NodeOpsleave() 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.
typeCheck in interface NodeOpstypeCheck in class Node_ctc - The type checking visitor.
SemanticException
public NodeVisitor exceptionCheckEnter(ExceptionChecker ec)
throws SemanticException
NodeOpsenter() method of the
visitor. The * method should perform work that should be done
before visiting the children of the node. The method may return
this or a new copy of the node on which
visitChildren() and leave() will be
invoked.
exceptionCheckEnter in interface NodeOpsexceptionCheckEnter in class Node_cec - The visitor.
SemanticException
public void prettyPrint(CodeWriter w,
PrettyPrinter tr)
Node_cCodeWriter.
prettyPrint in interface NodeOpsprettyPrint in class Node_cw - The code writer to which to write.tr - The pretty printer. This is not a visitor.public Term entry()
entry in interface Termentry in class Term_c
public java.util.List acceptCFG(CFGBuilder v,
java.util.List succs)
acceptCFG in interface TermacceptCFG in class Term_c
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||