|
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.JLiteral
org.multijava.mjc.JNumberLiteral
org.multijava.mjc.JOrdinalLiteral
org.multijava.mjc.JCharLiteral
A simple character constant
| Field Summary | |
private Character |
value
|
| Fields inherited from class org.multijava.mjc.JOrdinalLiteral |
image, 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 | |
JCharLiteral(TokenReference where,
char val)
Construct a node in the parsing tree |
|
JCharLiteral(TokenReference where,
Object val)
Construct a node in the parsing tree |
|
JCharLiteral(TokenReference where,
String image)
Construct a node in the parsing tree |
|
| Method Summary | |
void |
accept(MjcVisitor p)
Accepts the specified visitor |
JExpression |
convertType(CType dest,
CExpressionContextType context)
convertType changes the type of this expression to an other |
CType |
getType()
Compute the type of this expression (called after parsing) |
Object |
getValue()
get a Character that represents the value of this literal Do not call before typecheck |
boolean |
isAssignableTo(CType dest)
Is this type assignable to the given type by assignment type conversion [JLS2 5.2]. |
Number |
numberValue()
get a Number that represents the value of this literal Do not call before typecheck |
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.JOrdinalLiteral |
calculateType, genCode, image, isImageOnly, isOrdinalLiteral, negate |
| Methods inherited from class org.multijava.mjc.JNumberLiteral |
isDefault |
| Methods inherited from class org.multijava.mjc.JLiteral |
createLiteral, getLiteral, isConstant, isLiteral, isLValue |
| Methods inherited from class org.multijava.mjc.JExpression |
buildUniverseDynChecks, clone, dumpArray, fail, genBranch, genUniverseDynCheckCode, getApparentType, getBooleanLiteral, getFANonNulls, getFANulls, getNumberLiteral, getOrdinalLiteral, getRealLiteral, getStringLiteral, isBooleanLiteral, isDeclaredNonNull, isMaybeInitializable, isNonNull, 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 Character value
| Constructor Detail |
public JCharLiteral(TokenReference where,
String image)
where - the line of this node in the source codeimage - the string representation of this literal
public JCharLiteral(TokenReference where,
char val)
where - the line of this node in the source codeval - the value of this literal
public JCharLiteral(TokenReference where,
Object val)
where - the line of this node in the source codeval - the value of this literal| Method Detail |
public String toString()
toString in class JNumberLiteralpublic CType getType()
getType in class JOrdinalLiteralpublic Number numberValue()
numberValue in class JOrdinalLiteralpublic Object getValue()
getValue in class JOrdinalLiteral
public JExpression typecheck(CExpressionContextType context)
throws PositionedError
typecheck in class JOrdinalLiteralcontext - the context in which this expression appears
JExpression.typecheck())
PositionedError - if the check fails
public JExpression convertType(CType dest,
CExpressionContextType context)
throws PositionedError
convertType in class JOrdinalLiteraldest - the destination type
PositionedErrorpublic boolean isAssignableTo(CType dest)
isAssignableTo in class JOrdinalLiteraldest - the destination type
public void accept(MjcVisitor p)
accept in class JOrdinalLiteralp - the visitor
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||