public abstract class JL5AnnotatedElementExt extends JL5TermExt implements AnnotatedElement
Modifier and Type | Field and Description |
---|---|
protected java.util.List<AnnotationElem> |
annotations |
Constructor and Description |
---|
JL5AnnotatedElementExt(java.util.List<AnnotationElem> annotations) |
Modifier and Type | Method and Description |
---|---|
Node |
annotationCheck(AnnotationChecker annoCheck) |
java.util.List<AnnotationElem> |
annotationElems() |
Node |
annotationElems(java.util.List<AnnotationElem> annotations) |
protected <N extends Node> |
annotationElems(N n,
java.util.List<AnnotationElem> annotations) |
protected abstract Declaration |
declaration()
Return the Declaration associated with this AST node.
|
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given
CodeWriter . |
abstract void |
setAnnotations(Annotations annotations)
Set the annotations on the appropriate type object associated with
this AnnotatedElement.
|
Node |
typeCheck(TypeChecker tc)
Type check the AST.
|
Node |
visitChildren(NodeVisitor v)
Visit the children of the node.
|
acceptCFG, firstChild, node
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, ext, ext, extRewrite, extRewriteEnter, init, initPred, pred, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, superLang, throwTypes, toString, typeCheckEnter, typeCheckOverride, visitChild, visitList
protected java.util.List<AnnotationElem> annotations
public JL5AnnotatedElementExt(java.util.List<AnnotationElem> annotations)
public java.util.List<AnnotationElem> annotationElems()
annotationElems
in interface AnnotatedElement
public Node annotationElems(java.util.List<AnnotationElem> annotations)
annotationElems
in interface AnnotatedElement
protected <N extends Node> N annotationElems(N n, java.util.List<AnnotationElem> annotations)
public Node visitChildren(NodeVisitor v)
NodeOps
visitChildren
in interface NodeOps
visitChildren
in class Ext_c
v
- The visitor that will traverse/rewrite the AST.this
.public Node typeCheck(TypeChecker tc) 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.typeCheck
in interface NodeOps
typeCheck
in class Ext_c
tc
- The type checking visitor.SemanticException
public void prettyPrint(CodeWriter w, PrettyPrinter tr)
NodeOps
CodeWriter
.prettyPrint
in interface NodeOps
prettyPrint
in class Ext_c
w
- The code writer to which to write.tr
- The pretty printer. This is not a visitor.public Node annotationCheck(AnnotationChecker annoCheck) throws SemanticException
annotationCheck
in interface AnnotatedElement
SemanticException
protected abstract Declaration declaration()
public abstract void setAnnotations(Annotations annotations)
AnnotatedElement
setAnnotations
in interface AnnotatedElement