|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.util.compiler.Phylum
org.multijava.mjc.JPhylum
org.multijava.mjc.JExpression
org.multijava.mjc.JExplicitConstructorInvocation
This class represents a explicit call to a super or self constructor.
| Field Summary | |
private JExpression[] |
args
|
private boolean |
argsCompleted
Flag indicates whether the arguments have been processed to include outer this parameters for inner classes. |
private CSourceClass |
callingClass
The class of the constructor that contains this expression. |
private CMethod |
callingConstructor
The constructor that contains this expression. |
private CClass |
clazz
The class of the constructor invoked by this expression. |
private String |
ident
|
private boolean |
isPrefixSynthesized
true if the prefix is a synthesized one (e.g.,
JAV_OUTER_THIS) as the result of typechecking. |
private CMethod |
method
|
private JExpression |
prefix
|
private JExpression[] |
syntheticSuperParms
Stores the expressions needed to push outer local variables onto the call stack when invoking a superclass constructor. |
| Fields inherited from class org.multijava.mjc.JExpression |
EMPTY |
| Fields inherited from class org.multijava.util.compiler.Phylum |
|
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
JExplicitConstructorInvocation(TokenReference where,
String ident,
JExpression[] args)
Construct an AST node for an explicit constructor invocation. |
|
JExplicitConstructorInvocation(TokenReference where,
JExpression prefix,
String ident,
JExpression[] args)
Construct a node in the parsing tree. |
|
| Method Summary | |
void |
accept(MjcVisitor p)
Accepts the specified visitor |
void |
genCode(CodeSequence code)
Generates a sequence of bytecodes |
CType |
getType()
|
String |
ident()
|
boolean |
isPrefixSynthesized()
Returns true if the prefix is a synthesized one, e.g., JAV_OUTER_THIS. |
(package private) boolean |
isThisInvoke()
Returns true if it's this() else it's super(). |
CMethod |
method()
Returns the constructor being called. |
JExpression[] |
params()
|
JExpression |
prefix()
|
JExpression |
typecheck(CExpressionContextType context)
Typechecks the expression and mutates the context to record information gathered during typechecking. |
| Methods inherited from class org.multijava.mjc.JExpression |
buildUniverseDynChecks, clone, convertType, dumpArray, fail, genBranch, genUniverseDynCheckCode, getApparentType, getBooleanLiteral, getFANonNulls, getFANulls, getLiteral, getNumberLiteral, getOrdinalLiteral, getRealLiteral, getStringLiteral, isAssignableTo, isBooleanLiteral, isConstant, isDeclaredNonNull, isLiteral, isMaybeInitializable, isNonNull, isOrdinalLiteral, isRealLiteral, isStatementExpression, isStringLiteral, typecheck, unParenthesize |
| Methods inherited from class org.multijava.mjc.JPhylum |
check, check, check, check, fail, fail, warn, warn, warn, warn |
| Methods inherited from class org.multijava.util.compiler.Phylum |
getTokenReference, setTokenReference |
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private CClass clazz
private invariant clazz != null && method != null ==> method.owner() == clazz;
private CSourceClass callingClass
private CMethod callingConstructor
private CMethod method
private JExpression prefix
private String ident
private JExpression[] args
private boolean isPrefixSynthesized
true if the prefix is a synthesized one (e.g.,
JAV_OUTER_THIS) as the result of typechecking.
private boolean argsCompleted
private JExpression[] syntheticSuperParms
private invariant isThisInvoke() <==> syntheticSuperParms == null;
| Constructor Detail |
public JExplicitConstructorInvocation(TokenReference where,
JExpression prefix,
String ident,
JExpression[] args)
ensures argsCompleted == false;
where - the line of this node in the source codeprefix - a qualifying outer class for subclasses
of inner class, see JLS2, 8.8.5.1ident - the method nameargs - the argument of the call
public JExplicitConstructorInvocation(TokenReference where,
String ident,
JExpression[] args)
ensures argsCompleted == true;
where - the line of this node in the source codeident - the method nameargs - the arguments of the call, including any outer
classes for inner class constructors | Method Detail |
final boolean isThisInvoke()
public boolean isPrefixSynthesized()
public CMethod method()
public CType getType()
JExpression
public JExpression prefix()
public String ident()
public JExpression[] params()
public JExpression typecheck(CExpressionContextType context)
throws PositionedError
context - the context in which this expression appears
JExpression.typecheck())
PositionedError - if the check fails public void accept(MjcVisitor p)
p - the visitorpublic void genCode(CodeSequence code)
code - the code list
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||