|
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.JTypeNameExpression
This class represents the AST node for a type name expression like
Object
| Field Summary | |
private JNameExpression |
sourceName
The name of this type as originally appeared in the source file. |
private CClassType |
type
|
| 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 | |
JTypeNameExpression(TokenReference where,
String qualifiedName,
CUniverse univ,
JNameExpression sourceName)
Constructs a node in the parsing tree. |
|
JTypeNameExpression(TokenReference where,
CClassType type,
JNameExpression sourceName)
Constructs 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 |
CClassType |
getClassType()
Compute the type of this expression (called after parsing) |
CType |
getType()
Compute the type of this expression (called after parsing) |
String |
qualifiedName()
Returns a qualified name for the type of this |
JNameExpression |
sourceName()
Returns the name of this type as originally appeared in the source file. |
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 CClassType type
private JNameExpression sourceName
| Constructor Detail |
public JTypeNameExpression(TokenReference where,
String qualifiedName,
CUniverse univ,
JNameExpression sourceName)
where - the line of this node in the source codequalifiedName - the name of the type as a Stringuniv - the universe modifiersourceName - the name as appeared in the source file;
useful for pretty printing.
public JTypeNameExpression(TokenReference where,
CClassType type,
JNameExpression sourceName)
where - the line of this node in the source codetype - the type that this expression referencessourceName - the name as appeared in the source file;
useful for pretty printing.| Method Detail |
public String toString()
toString in class Objectpublic JNameExpression sourceName()
public CType getType()
public CClassType getClassType()
public String qualifiedName()
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
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||