|
|||||||||
| 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 Initializerpublic Initializer flags(Flags flags)
flags in interface Initializerpublic InitializerInstance initializerInstance()
initializerInstance in interface Initializerpublic Initializer initializerInstance(InitializerInstance ii)
public <>Block body()
body in interface Initializerpublic Initializer body(<>Block body)
protected Initializer_c reconstruct(<>Block body)
public Node visitChildren(NodeVisitor v)
visitChildren in interface NodevisitChildren in class Node_cpublic void enterScope(Context c)
NodeenterScope in interface NodeenterScope in class Node_cpublic void leaveScope(Context c)
NodeleaveScope in interface NodeleaveScope in class Node_cpublic Node buildTypesOverride_(TypeBuilder tb)
buildTypesOverride_ in interface NodebuildTypesOverride_ in class Node_cjltools.ast.Nodecb - The visitor which adds new type objects to the
TypeSystem.
public Node typeCheck_(TypeChecker tc)
throws SemanticException
typeCheck_ in interface NodetypeCheck_ in class Node_c
public Node exceptionCheck_(ExceptionChecker ec)
throws SemanticException
exceptionCheck_ in interface NodeexceptionCheck_ in class Node_c
public void translate_(CodeWriter w,
Translator tr)
translate_ in interface Nodetranslate_ in class Node_cjltools.ast.Nodew - The code writer to which to write.tr - The translation pass. This is not a visitor.public void dump(CodeWriter w)
Nodedump in interface Nodedump in class Node_cpublic java.lang.String toString()
toString in class Node_c
public Node reconstructTypes_(NodeFactory nf,
TypeSystem ts,
Context c)
throws SemanticException
reconstructTypes_ in interface NodereconstructTypes_ in class Node_c
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||