|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.xbase.compiler.AbstractXbaseCompiler
public abstract class AbstractXbaseCompiler
Constructor Summary | |
---|---|
AbstractXbaseCompiler()
|
Method Summary | |
---|---|
void |
_toJavaExpression(java.lang.Void func,
IAppendable b)
|
void |
_toJavaExpression(XExpression func,
IAppendable b)
|
void |
_toJavaStatement(java.lang.Void func,
IAppendable b,
boolean isReferenced)
|
void |
_toJavaStatement(XExpression func,
IAppendable b,
boolean isReferenced)
|
protected boolean |
canCompileToJavaExpression(XExpression expression,
IAppendable appendable)
|
IAppendable |
compile(XBlockExpression expr,
IAppendable b,
JvmTypeReference expectedReturnType)
this one trims the outer block |
IAppendable |
compile(XExpression obj,
IAppendable appendable,
JvmTypeReference expectedReturnType)
|
IAppendable |
compile(XExpression obj,
IAppendable appendable,
JvmTypeReference expectedReturnType,
java.util.Set<JvmTypeReference> declaredExceptions)
|
IAppendable |
compileAsJavaExpression(XExpression obj,
IAppendable appendable,
JvmTypeReference expectedType)
|
protected void |
declareSyntheticVariable(XExpression expr,
IAppendable b)
|
protected void |
declareSyntheticVariable(XExpression expr,
IAppendable b,
Later expression)
TODO rename this method to 'declareFreshLocalVariable' after 2.1.x |
protected java.lang.String |
getDefaultValueLiteral(XExpression expr)
|
protected java.lang.String |
getFavoriteVariableName(org.eclipse.emf.ecore.EObject ex)
|
protected IdentifiableSimpleNameProvider |
getNameProvider()
|
protected Primitives |
getPrimitives()
|
protected TypeConformanceComputer |
getTypeConformanceComputer()
|
protected ITypeProvider |
getTypeProvider()
|
protected TypeReferences |
getTypeReferences()
|
protected java.lang.String |
getVarName(java.lang.Object ex,
IAppendable appendable)
|
protected abstract void |
internalToConvertedExpression(XExpression obj,
IAppendable appendable,
JvmTypeReference toBeConvertedTo)
|
protected void |
internalToJavaExpression(XExpression obj,
IAppendable appendable)
|
protected void |
internalToJavaStatement(XExpression obj,
IAppendable builder,
boolean isReferenced)
|
protected boolean |
isPrimitiveVoid(XExpression xExpression)
|
protected boolean |
isReferenceToForeignTypeParameter(JvmTypeReference reference,
org.eclipse.emf.ecore.EObject context)
|
protected boolean |
isVariableDeclarationRequired(XExpression expr,
IAppendable 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 java.lang.String |
makeJavaIdentifier(java.lang.String name)
|
protected boolean |
needsSneakyThrow(XExpression obj,
java.util.Set<JvmTypeReference> declaredExceptions)
|
protected JvmTypeReference |
resolveMultiType(JvmTypeReference typeRef)
|
protected void |
serialize(JvmTypeReference type,
org.eclipse.emf.ecore.EObject context,
IAppendable appendable)
|
protected void |
serialize(JvmTypeReference type,
org.eclipse.emf.ecore.EObject context,
IAppendable appendable,
boolean withoutConstraints,
boolean paramsToWildcard)
|
protected void |
serialize(JvmTypeReference type,
org.eclipse.emf.ecore.EObject context,
IAppendable appendable,
boolean withoutConstraints,
boolean paramsToWildcard,
boolean paramsToObject,
boolean allowPrimitives)
|
void |
setNameProvider(IdentifiableSimpleNameProvider nameProvider)
|
void |
setTypeReferences(TypeReferences typeReferences)
Public for testing purpose. |
void |
toJavaExpression(XExpression obj,
IAppendable appendable)
|
void |
toJavaStatement(XExpression obj,
IAppendable appendable,
boolean isReferenced)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractXbaseCompiler()
Method Detail |
---|
protected TypeReferences getTypeReferences()
public void setTypeReferences(TypeReferences typeReferences)
protected ITypeProvider getTypeProvider()
protected Primitives getPrimitives()
public IAppendable compile(XExpression obj, IAppendable appendable, JvmTypeReference expectedReturnType)
public IAppendable compileAsJavaExpression(XExpression obj, IAppendable appendable, JvmTypeReference expectedType)
protected boolean canCompileToJavaExpression(XExpression expression, IAppendable appendable)
public IAppendable compile(XExpression obj, IAppendable appendable, JvmTypeReference expectedReturnType, java.util.Set<JvmTypeReference> declaredExceptions)
protected boolean needsSneakyThrow(XExpression obj, java.util.Set<JvmTypeReference> declaredExceptions)
public IAppendable compile(XBlockExpression expr, IAppendable b, JvmTypeReference expectedReturnType)
protected abstract void internalToConvertedExpression(XExpression obj, IAppendable appendable, JvmTypeReference toBeConvertedTo)
protected boolean isPrimitiveVoid(XExpression xExpression)
protected void internalToJavaStatement(XExpression obj, IAppendable builder, boolean isReferenced)
public void toJavaExpression(XExpression obj, IAppendable appendable)
public void toJavaStatement(XExpression obj, IAppendable appendable, boolean isReferenced)
protected void internalToJavaExpression(XExpression obj, IAppendable appendable)
public void _toJavaStatement(XExpression func, IAppendable b, boolean isReferenced)
public void _toJavaExpression(XExpression func, IAppendable b)
public void _toJavaStatement(java.lang.Void func, IAppendable b, boolean isReferenced)
public void _toJavaExpression(java.lang.Void func, IAppendable b)
protected void serialize(JvmTypeReference type, org.eclipse.emf.ecore.EObject context, IAppendable appendable)
protected void serialize(JvmTypeReference type, org.eclipse.emf.ecore.EObject context, IAppendable appendable, boolean withoutConstraints, boolean paramsToWildcard)
protected void serialize(JvmTypeReference type, org.eclipse.emf.ecore.EObject context, IAppendable appendable, boolean withoutConstraints, boolean paramsToWildcard, boolean paramsToObject, boolean allowPrimitives)
protected boolean isReferenceToForeignTypeParameter(JvmTypeReference reference, org.eclipse.emf.ecore.EObject context)
protected JvmTypeReference resolveMultiType(JvmTypeReference typeRef)
protected java.lang.String getVarName(java.lang.Object ex, IAppendable appendable)
public void setNameProvider(IdentifiableSimpleNameProvider nameProvider)
protected IdentifiableSimpleNameProvider getNameProvider()
protected java.lang.String getFavoriteVariableName(org.eclipse.emf.ecore.EObject ex)
protected java.lang.String makeJavaIdentifier(java.lang.String name)
protected void declareSyntheticVariable(XExpression expr, IAppendable b)
protected java.lang.String getDefaultValueLiteral(XExpression expr)
protected void declareSyntheticVariable(XExpression expr, IAppendable b, Later expression)
protected boolean isVariableDeclarationRequired(XExpression expr, IAppendable b)
protected TypeConformanceComputer getTypeConformanceComputer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |