public class AnnotationElemDecl_c extends Term_c implements AnnotationElemDecl
Term.Instance
Modifier and Type | Field and Description |
---|---|
protected AnnotationTypeElemInstance |
ai |
protected Term |
defaultVal |
protected Flags |
flags |
protected Id |
name |
protected TypeNode |
type |
exceptions, reachable
Constructor and Description |
---|
AnnotationElemDecl_c(Position pos,
Flags flags,
TypeNode type,
Id name,
Term defaultVal) |
Modifier and Type | Method and Description |
---|---|
<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.
|
AnnotationTypeElemInstance |
annotationElemInstance() |
AnnotationElemDecl |
annotationElemInstance(AnnotationTypeElemInstance ai) |
protected <N extends AnnotationElemDecl_c> |
annotationElemInstance(N n,
AnnotationTypeElemInstance ai) |
Block |
body()
The body of the method, constructor, or initializer.
|
CodeBlock |
body(Block body)
Set the body of the method, constructor, or initializer.
|
Node |
buildTypes(TypeBuilder tb)
Collects classes, methods, and fields from the AST rooted at this node
and constructs type objects for these.
|
NodeVisitor |
buildTypesEnter(TypeBuilder tb)
Collects classes, methods, and fields from the AST rooted at this node
and constructs type objects for these.
|
Term |
codeBody()
The body of the method, constructor, initializer, or field initializer.
|
CodeInstance |
codeInstance()
The CodeInstance of the method, constructor, or initializer.
|
Term |
defaultVal() |
protected <N extends AnnotationElemDecl_c> |
defaultVal(N n,
Term defaultVal) |
AnnotationElemDecl |
defaultVal(Term def) |
Node |
disambiguate(AmbiguityRemover ar)
Remove any remaining ambiguities from the AST.
|
Term |
firstChild()
Return the first direct subterm performed when evaluating this term.
|
Flags |
flags()
The procedure's flags.
|
AnnotationElemDecl |
flags(Flags flags)
Set the procedure's flags.
|
protected <N extends AnnotationElemDecl_c> |
flags(N n,
Flags flags) |
java.util.List<Formal> |
formals()
The procedure's formal parameters.
|
MethodDecl |
formals(java.util.List<Formal> formals)
Set the procedure's formal parameters.
|
Id |
id()
The procedure's name.
|
AnnotationElemDecl |
id(Id name)
Set the procedure's name.
|
protected <N extends AnnotationElemDecl_c> |
id(N n,
Id name) |
MemberInstance |
memberInstance() |
MethodInstance |
methodInstance()
The method type object.
|
MethodDecl |
methodInstance(MethodInstance mi)
Set the method's type object.
|
java.lang.String |
name()
The procedure's name.
|
AnnotationElemDecl |
name(java.lang.String name)
Set the procedure's name.
|
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given
CodeWriter . |
ProcedureInstance |
procedureInstance()
The procedure's type object.
|
protected AnnotationElemDecl_c |
reconstruct(TypeNode type,
Term defaultVal) |
TypeNode |
returnType()
The method's return type.
|
MethodDecl |
returnType(TypeNode returnType)
Set the method's return type.
|
java.util.List<TypeNode> |
throwTypes()
The procedure's exception throw types.
|
MethodDecl |
throwTypes(java.util.List<TypeNode> throwTypes)
Set the procedure's exception throw types.
|
java.lang.String |
toString() |
TypeNode |
type() |
protected <N extends AnnotationElemDecl_c> |
type(N n,
TypeNode type) |
AnnotationElemDecl |
type(TypeNode type) |
Node |
typeCheck(TypeChecker tc)
Type check the AST.
|
Node |
visitChildren(NodeVisitor v)
Visit the children of the node.
|
exceptionCheck, exceptions, exceptions, exceptions, extRewrite, listChild, reachable, reachable, reachable
addDecls, checkConstants, childExpectedType, copy, copy, copy, copyIfNeeded, del, del, 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, print, printBlock, printSubStmt, throwTypes, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
exceptions, exceptions, reachable, reachable
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, checkConstants, childExpectedType, copy, copy, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheckEnter, typeCheckOverride, visitChild, visitList
protected TypeNode type
protected Flags flags
protected Term defaultVal
protected Id name
protected AnnotationTypeElemInstance ai
public TypeNode type()
type
in interface AnnotationElemDecl
public AnnotationElemDecl type(TypeNode type)
type
in interface AnnotationElemDecl
protected <N extends AnnotationElemDecl_c> N type(N n, TypeNode type)
public Flags flags()
ProcedureDecl
flags
in interface ProcedureDecl
flags
in interface AnnotationElemDecl
public AnnotationElemDecl flags(Flags flags)
ProcedureDecl
flags
in interface ProcedureDecl
flags
in interface AnnotationElemDecl
protected <N extends AnnotationElemDecl_c> N flags(N n, Flags flags)
public Term defaultVal()
defaultVal
in interface AnnotationElemDecl
public AnnotationElemDecl defaultVal(Term def)
defaultVal
in interface AnnotationElemDecl
protected <N extends AnnotationElemDecl_c> N defaultVal(N n, Term defaultVal)
public Id id()
ProcedureDecl
id
in interface ProcedureDecl
id
in interface AnnotationElemDecl
public AnnotationElemDecl id(Id name)
ProcedureDecl
id
in interface ProcedureDecl
id
in interface AnnotationElemDecl
protected <N extends AnnotationElemDecl_c> N id(N n, Id name)
public java.lang.String name()
ProcedureDecl
name
in interface ProcedureDecl
name
in interface AnnotationElemDecl
public AnnotationElemDecl name(java.lang.String name)
ProcedureDecl
name
in interface ProcedureDecl
name
in interface AnnotationElemDecl
public AnnotationTypeElemInstance annotationElemInstance()
annotationElemInstance
in interface AnnotationElemDecl
public AnnotationElemDecl annotationElemInstance(AnnotationTypeElemInstance ai)
annotationElemInstance
in interface AnnotationElemDecl
protected <N extends AnnotationElemDecl_c> N annotationElemInstance(N n, AnnotationTypeElemInstance ai)
protected AnnotationElemDecl_c reconstruct(TypeNode type, Term defaultVal)
public Node visitChildren(NodeVisitor v)
NodeOps
visitChildren
in interface NodeOps
visitChildren
in class Node_c
v
- The visitor that will traverse/rewrite the AST.this
.public NodeVisitor buildTypesEnter(TypeBuilder tb) throws SemanticException
NodeOps
TypeSystem
.
This method is called by the enter()
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.buildTypesEnter
in interface NodeOps
buildTypesEnter
in class Node_c
tb
- The visitor which adds new type objects to the
TypeSystem
.SemanticException
public Node buildTypes(TypeBuilder tb) throws SemanticException
NodeOps
TypeSystem
.
This method is called by the 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.buildTypes
in interface NodeOps
buildTypes
in class Node_c
tb
- The visitor which adds new type objects to the
TypeSystem
.SemanticException
public Node disambiguate(AmbiguityRemover ar) 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.
The node should not assume that its children have been disambiguated.
If it depends on a child being disambiguated,
it may just return this
without doing any work.disambiguate
in interface NodeOps
disambiguate
in class Node_c
ar
- The visitor which disambiguates.SemanticException
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 Node_c
tc
- The type checking visitor.SemanticException
public <T> java.util.List<T> acceptCFG(CFGBuilder<?> v, java.util.List<T> succs)
TermOps
public void prettyPrint(CodeWriter w, PrettyPrinter tr)
Node_c
CodeWriter
.prettyPrint
in interface NodeOps
prettyPrint
in class Node_c
w
- The code writer to which to write.tr
- The pretty printer. This is not a visitor.public MemberInstance memberInstance()
memberInstance
in interface ClassMember
public Term firstChild()
TermOps
firstChild
in interface TermOps
firstChild
in class Term_c
public TypeNode returnType()
MethodDecl
returnType
in interface MethodDecl
public MethodDecl returnType(TypeNode returnType)
MethodDecl
returnType
in interface MethodDecl
public java.util.List<Formal> formals()
ProcedureDecl
formals
in interface ProcedureDecl
Formal
.public MethodDecl formals(java.util.List<Formal> formals)
ProcedureDecl
formals
in interface ProcedureDecl
formals
- A list of Formal
.public java.util.List<TypeNode> throwTypes()
ProcedureDecl
throwTypes
in interface ProcedureDecl
TypeNode
.public MethodDecl throwTypes(java.util.List<TypeNode> throwTypes)
ProcedureDecl
throwTypes
in interface ProcedureDecl
throwTypes
- A list of TypeNode
.public MethodInstance methodInstance()
MethodDecl
methodInstance
in interface MethodDecl
public MethodDecl methodInstance(MethodInstance mi)
MethodDecl
methodInstance
in interface MethodDecl
public ProcedureInstance procedureInstance()
ProcedureDecl
procedureInstance
in interface ProcedureDecl
public Block body()
CodeBlock
public CodeBlock body(Block body)
CodeBlock
public Term codeBody()
CodeNode
public CodeInstance codeInstance()
CodeNode
codeInstance
in interface CodeNode