|
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.JLiteral
org.multijava.mjc.JStringLiteral
A simple character constant
| Field Summary | |
private String |
value
|
| 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 | |
JStringLiteral(TokenReference where,
String image)
Construct a node in the parsing tree |
|
JStringLiteral(TokenReference where,
String image,
boolean escaped)
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()
Compute the type of this expression (called after parsing) |
Object |
getValue()
get a Number that represents the value of this literal Do not call before typecheck |
boolean |
isDefault()
Returns the literal value of an expression |
boolean |
isNonNull(CContextType context)
Returns true iff the value represented by this expression is non-null |
boolean |
isStringLiteral()
Does this expression represent a string literal? |
String |
stringValue()
get a String that represents the value of this literal Do not call before typecheck |
String |
toString()
|
| Methods inherited from class org.multijava.mjc.JLiteral |
createLiteral, getLiteral, isConstant, isLiteral, isLValue, typecheck |
| Methods inherited from class org.multijava.mjc.JExpression |
buildUniverseDynChecks, clone, convertType, dumpArray, fail, genBranch, genUniverseDynCheckCode, getApparentType, getBooleanLiteral, getFANonNulls, getFANulls, getNumberLiteral, getOrdinalLiteral, getRealLiteral, getStringLiteral, isAssignableTo, isBooleanLiteral, isDeclaredNonNull, isMaybeInitializable, isOrdinalLiteral, isRealLiteral, isStatementExpression, 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 String value
| Constructor Detail |
public JStringLiteral(TokenReference where,
String image)
where - the line of this node in the source codeimage - the string representation of this literal
public JStringLiteral(TokenReference where,
String image,
boolean escaped)
where - the line of this node in the source codeimage - the string representation of this literalescaped - there are escapes in the image| Method Detail |
public String toString()
toString in class Objectpublic CType getType()
public boolean isNonNull(CContextType context)
isNonNull in class JExpressionpublic Object getValue()
public String stringValue()
public boolean isDefault()
public boolean isStringLiteral()
isStringLiteral in class JExpressionpublic 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 | ||||||||||