|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jltools.ext.jl.ast.Node_c | +--jltools.ext.jl.ast.Initializer_c
An Initializer
is an immutable representation of an
initializer block in a Java class (which appears outside of any
method). Such a block is executed before the code for any of the
constructors. Such a block can optionally be static, in which case
it is executed when the class is loaded.
Inner classes inherited from class jltools.ext.jl.ast.Node_c |
Node_c.StringCodeWriter |
Field Summary | |
protected < |
body
|
protected Flags |
flags
|
protected InitializerInstance |
ii
|
Fields inherited from class jltools.ext.jl.ast.Node_c |
ext, position |
Constructor Summary | |
Initializer_c(Ext ext,
Position pos,
Flags flags,
<
|
Method Summary | |
< |
body()
Get the body of the initializer. |
Initializer |
body(<
Set the body of the initializer. |
Node |
buildTypesOverride_(TypeBuilder tb)
Build type objects for the initializer. |
void |
dump(CodeWriter w)
Dump the AST node for debugging purposes. |
void |
enterScope(Context c)
Adjust the environment on entering the scope of the method. |
Node |
exceptionCheck_(ExceptionChecker ec)
Check exceptions thrown by the initializer. |
Flags |
flags()
Get the flags of the initializer. |
Initializer |
flags(Flags flags)
Set the flags of the initializer. |
InitializerInstance |
initializerInstance()
Get the initializer instance of the initializer. |
Initializer |
initializerInstance(InitializerInstance ii)
Set the initializer instance of the initializer. |
void |
leaveScope(Context c)
Adjust the environment on leaving the scope of the method. |
protected Initializer_c |
reconstruct(<
Reconstruct the initializer. |
Node |
reconstructTypes_(NodeFactory nf,
TypeSystem ts,
Context c)
Reconstruct the type objects for the initializer. |
java.lang.String |
toString()
|
void |
translate_(CodeWriter w,
Translator tr)
Write the initializer to an output file. |
Node |
typeCheck_(TypeChecker tc)
Type check the initializer. |
Node |
visitChildren(NodeVisitor v)
Visit the children of the initializer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jltools.ast.Initializer |
body |
Methods inherited from interface jltools.ast.Node |
buildTypes_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, position, position, typeCheckOverride_, visit |
Field Detail |
protected Flags flags
protected <>Block body
protected InitializerInstance ii
Constructor Detail |
public Initializer_c(Ext ext, Position pos, Flags flags, <>Block body)
Method Detail |
public Flags flags()
flags
in interface Initializer
public Initializer flags(Flags flags)
flags
in interface Initializer
public InitializerInstance initializerInstance()
initializerInstance
in interface Initializer
public Initializer initializerInstance(InitializerInstance ii)
public <>Block body()
body
in interface Initializer
public Initializer body(<>Block body)
protected Initializer_c reconstruct(<>Block body)
public Node visitChildren(NodeVisitor v)
visitChildren
in interface Node
visitChildren
in class Node_c
public void enterScope(Context c)
Node
enterScope
in interface Node
enterScope
in class Node_c
public void leaveScope(Context c)
Node
leaveScope
in interface Node
leaveScope
in class Node_c
public Node buildTypesOverride_(TypeBuilder tb)
buildTypesOverride_
in interface Node
buildTypesOverride_
in class Node_c
jltools.ast.Node
cb
- The visitor which adds new type objects to the
TypeSystem
.public Node typeCheck_(TypeChecker tc) throws SemanticException
typeCheck_
in interface Node
typeCheck_
in class Node_c
public Node exceptionCheck_(ExceptionChecker ec) throws SemanticException
exceptionCheck_
in interface Node
exceptionCheck_
in class Node_c
public void translate_(CodeWriter w, Translator tr)
translate_
in interface Node
translate_
in class Node_c
jltools.ast.Node
w
- The code writer to which to write.tr
- The translation pass. This is not a visitor.public void dump(CodeWriter w)
Node
dump
in interface Node
dump
in class Node_c
public java.lang.String toString()
toString
in class Node_c
public Node reconstructTypes_(NodeFactory nf, TypeSystem ts, Context c) throws SemanticException
reconstructTypes_
in interface Node
reconstructTypes_
in class Node_c
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |