public class LiteralsCompiler extends TypeConvertingCompiler
Constructor and Description |
---|
LiteralsCompiler() |
Modifier and Type | Method and Description |
---|---|
void |
_toJavaExpression(XBooleanLiteral expr,
ITreeAppendable b) |
void |
_toJavaExpression(XNullLiteral expr,
ITreeAppendable b) |
void |
_toJavaExpression(XNumberLiteral expr,
ITreeAppendable b) |
void |
_toJavaExpression(XStringLiteral expr,
ITreeAppendable b) |
void |
_toJavaExpression(XTypeLiteral expr,
ITreeAppendable b) |
void |
_toJavaStatement(XBooleanLiteral expr,
ITreeAppendable b,
boolean isReferenced) |
void |
_toJavaStatement(XNullLiteral expr,
ITreeAppendable b,
boolean isReferenced) |
void |
_toJavaStatement(XNumberLiteral expr,
ITreeAppendable b,
boolean isReferenced) |
void |
_toJavaStatement(XStringLiteral expr,
ITreeAppendable b,
boolean isReferenced) |
void |
_toJavaStatement(XTypeLiteral expr,
ITreeAppendable b,
boolean isReferenced) |
protected void |
doInternalToJavaStatement(XExpression obj,
ITreeAppendable appendable,
boolean isReferenced) |
protected void |
generateComment(Later expr,
ITreeAppendable b,
boolean isReferenced) |
protected void |
generateComment(XExpression expr,
ITreeAppendable b,
boolean isReferenced) |
protected void |
internalToConvertedExpression(XExpression obj,
ITreeAppendable appendable) |
protected boolean |
isVariableDeclarationRequired(XExpression expr,
ITreeAppendable b)
whether an expression needs to be declared in a statement
If an expression has side effects this method must return true for it.
|
protected void |
toJavaExpression(XStringLiteral literal,
ITreeAppendable appendable,
boolean useUnicodeEscapes) |
protected void |
toJavaStatement(XStringLiteral expr,
ITreeAppendable b,
boolean isReferenced,
boolean useUnicodeEscapes) |
doConversion, doReassignThisInClosure, findImplementingOperation, internalToConvertedExpression, internalToJavaExpression, normalizeBlockExpression, normalizeBlockExpression, reassignThisInClosure
_toJavaExpression, _toJavaStatement, appendDefaultLiteral, canCompileToJavaExpression, compile, compile, compile, compile, compileAsJavaExpression, compileAsJavaExpression, compileWithJvmConstructorCall, declareFreshLocalVariable, declareSyntheticVariable, findKnownTopLevelType, findKnownType, generateCheckedExceptionHandling, getDefaultValueLiteral, getExpectedType, getFavoriteVariableName, getLightweightExpectedType, getLightweightReturnType, getLightweightType, getLightweightType, getNameProvider, getReferenceName, getResolvedTypes, getType, getType, getTypeComputationServices, getTypeForVariableDeclaration, getTypeReferenceSerializer, getVarName, hasJvmConstructorCall, hasUnhandledException, internalCanCompileToJavaExpression, internalToJavaStatement, isEarlyExit, isJavaConformant, isPrimitiveVoid, isPrimitiveVoid, isReferenceToForeignTypeParameter, isUnhandledException, makeJavaIdentifier, needsSneakyThrow, newTypeReferenceOwner, resolveMultiType, serialize, serialize, serialize, setNameProvider, toJavaExpression, toJavaStatement, toLightweight
protected void internalToConvertedExpression(XExpression obj, ITreeAppendable appendable)
internalToConvertedExpression
in class TypeConvertingCompiler
protected void doInternalToJavaStatement(XExpression obj, ITreeAppendable appendable, boolean isReferenced)
doInternalToJavaStatement
in class AbstractXbaseCompiler
public void _toJavaExpression(XStringLiteral expr, ITreeAppendable b)
protected void toJavaExpression(XStringLiteral literal, ITreeAppendable appendable, boolean useUnicodeEscapes)
public void _toJavaStatement(XStringLiteral expr, ITreeAppendable b, boolean isReferenced)
protected void toJavaStatement(XStringLiteral expr, ITreeAppendable b, boolean isReferenced, boolean useUnicodeEscapes)
protected void generateComment(XExpression expr, ITreeAppendable b, boolean isReferenced)
protected void generateComment(Later expr, ITreeAppendable b, boolean isReferenced)
public void _toJavaExpression(XNumberLiteral expr, ITreeAppendable b)
public void _toJavaStatement(XNumberLiteral expr, ITreeAppendable b, boolean isReferenced)
public void _toJavaExpression(XNullLiteral expr, ITreeAppendable b)
expr
- the expression. Used by the dispatch strategy.public void _toJavaStatement(XNullLiteral expr, ITreeAppendable b, boolean isReferenced)
public void _toJavaExpression(XBooleanLiteral expr, ITreeAppendable b)
public void _toJavaStatement(XBooleanLiteral expr, ITreeAppendable b, boolean isReferenced)
public void _toJavaExpression(XTypeLiteral expr, ITreeAppendable b)
public void _toJavaStatement(XTypeLiteral expr, ITreeAppendable b, boolean isReferenced)
protected boolean isVariableDeclarationRequired(XExpression expr, ITreeAppendable b)
AbstractXbaseCompiler
isVariableDeclarationRequired
in class AbstractXbaseCompiler
expr
- the checked expressionb
- the appendable which represents the current compiler state