|
mjc | ||||||||||
| 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.JSuperExpression
This class represents a "super" primary expression in an AST. See JLS2 15.11.2, 15.12.
| Field Summary | |
private JExpression |
prefix
|
private CClass |
self
The class to which this super expression refers. |
private CClass |
sub
The local subclass of the class to which this super expression refers. |
| 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 | |
JSuperExpression(TokenReference where)
Construct a node for an unqualified super expression. |
|
JSuperExpression(TokenReference where,
JExpression prefix)
Construct a qualified "super" expression node in the AST, where only the qualifying expression is known, not its type. |
|
| Method Summary | |
void |
accept(MjcVisitor p)
Accepts the specified visitor |
void |
genCode(CodeSequence code)
Generates a sequence of bytecodes |
CType |
getType()
Returns the type of this expression. |
JExpression |
prefix()
|
CClass |
targetSubclass()
Returns the local subclass of the class to which this super expression refers. |
String |
toString()
|
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, wait, wait, wait |
| Field Detail |
private CClass self
private CClass sub
sub
is just the owner of this expression. For a qualified super
expression sub is the class named by the
qualifying expression.
private JExpression prefix
| Constructor Detail |
public JSuperExpression(TokenReference where)
where - the line of this node in the source code
public JSuperExpression(TokenReference where,
JExpression prefix)
prefix
must be a JNameExpression where the qualified name
denoted by prefix is a type name [JLS2 6.5.1].
where - the line of this node in the source codeprefix - the left expression like T
in T.super | Method Detail |
public JExpression prefix()
public CType getType()
public CClass targetSubclass()
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 listpublic String toString()
toString in class Object
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||