class JSuperConstruction extends JExpression
isStatementExpression, type
compilationUnit, line
Modifier | Constructor and Description |
---|---|
protected |
JSuperConstruction(int line,
ArrayList<JExpression> arguments)
Construct an AST node for a super(...) constructor given its line number
and arguments.
|
Modifier and Type | Method and Description |
---|---|
JExpression |
analyze(Context context)
Analyzing a super constructor statement involves (1) setting the type,
(2) analyzing the actual arguments, and (3) checking that this
construction statement is properly invoked (as the first statement in
another constructor).
|
void |
codegen(CLEmitter output)
Code generation involves generating code to load the actual arguments
onto the stack, and then the code for invoking the constructor.
|
void |
markProperUseOfConstructor()
Used in JConstructorDeclaration to mark super(...) as being properly
placed, ie, as the first statement in its body.
|
void |
writeToStdOut(PrettyPrinter p)
Write the information pertaining to this AST to STDOUT.
|
codegen, isStatementExpression, type
line, partialCodegen
protected JSuperConstruction(int line, ArrayList<JExpression> arguments)
line
- line in which the constructor occurs in the source file.arguments
- the constructor's arguments.public void markProperUseOfConstructor()
public JExpression analyze(Context context)
analyze
in class JExpression
context
- context in which names are resolved.public void codegen(CLEmitter output)
public void writeToStdOut(PrettyPrinter p)
JAST
writeToStdOut
in class JAST
p
- for pretty printing with indentation.