public abstract class AbstractXbaseCompiler extends Object
| Constructor and Description |
|---|
AbstractXbaseCompiler() |
public TypeReferenceSerializer getTypeReferenceSerializer()
protected JvmType findKnownTopLevelType(Class<?> rawType, org.eclipse.emf.common.notify.Notifier context)
protected JvmType findKnownType(Class<?> rawType, org.eclipse.emf.common.notify.Notifier context)
protected CommonTypeComputationServices getTypeComputationServices()
protected ITypeReferenceOwner newTypeReferenceOwner(org.eclipse.emf.ecore.EObject context)
protected LightweightTypeReference toLightweight(JvmTypeReference reference, org.eclipse.emf.ecore.EObject context)
public ITreeAppendable compile(XExpression obj, ITreeAppendable appendable, LightweightTypeReference expectedReturnType)
public ITreeAppendable compileAsJavaExpression(XExpression obj, ITreeAppendable parentAppendable, JvmTypeReference expectedType)
public ITreeAppendable compileAsJavaExpression(XExpression obj, ITreeAppendable parentAppendable, LightweightTypeReference expectedType)
protected void appendDefaultLiteral(ITreeAppendable b, LightweightTypeReference type)
protected void generateCheckedExceptionHandling(ITreeAppendable appendable)
protected boolean canCompileToJavaExpression(XExpression expression, ITreeAppendable appendable)
protected boolean internalCanCompileToJavaExpression(XExpression expression, ITreeAppendable appendable)
expression - to be used by subtypesappendable - to be used by subtypespublic ITreeAppendable compile(XExpression obj, ITreeAppendable parentAppendable, JvmTypeReference expectedReturnType, Set<JvmTypeReference> declaredExceptions)
public ITreeAppendable compile(XExpression obj, ITreeAppendable parentAppendable, LightweightTypeReference expectedReturnType, Set<JvmTypeReference> declaredExceptions)
protected void compileWithJvmConstructorCall(XBlockExpression obj, ITreeAppendable apendable)
protected boolean hasJvmConstructorCall(XExpression obj)
protected boolean needsSneakyThrow(XExpression obj, Collection<JvmTypeReference> declaredExceptions)
protected boolean hasUnhandledException(List<LightweightTypeReference> thrownExceptions, Collection<JvmTypeReference> declaredExceptions)
protected boolean isUnhandledException(LightweightTypeReference thrownException, Collection<JvmTypeReference> declaredExceptions)
public ITreeAppendable compile(XBlockExpression expr, ITreeAppendable b, LightweightTypeReference expectedReturnType)
protected boolean isEarlyExit(XExpression expr)
protected boolean isPrimitiveVoid(JvmTypeReference typeRef)
protected JvmTypeReference getType(XExpression expr)
protected JvmTypeReference getType(JvmIdentifiableElement identifiable)
protected LightweightTypeReference getLightweightType(XExpression expr)
protected LightweightTypeReference getLightweightType(JvmIdentifiableElement identifiable)
protected LightweightTypeReference getLightweightReturnType(XExpression expr)
protected IResolvedTypes getResolvedTypes(org.eclipse.emf.ecore.EObject obj)
protected JvmTypeReference getExpectedType(XExpression expr)
protected LightweightTypeReference getLightweightExpectedType(XExpression expr)
protected abstract void internalToConvertedExpression(XExpression obj, ITreeAppendable appendable, LightweightTypeReference toBeConvertedTo)
protected boolean isPrimitiveVoid(XExpression xExpression)
protected final void internalToJavaStatement(XExpression obj, ITreeAppendable builder, boolean isReferenced)
protected void doInternalToJavaStatement(XExpression obj, ITreeAppendable builder, boolean isReferenced)
public void toJavaExpression(XExpression obj, ITreeAppendable appendable)
public void toJavaStatement(XExpression obj, ITreeAppendable appendable, boolean isReferenced)
protected void internalToJavaExpression(XExpression obj, ITreeAppendable appendable)
public void _toJavaStatement(XExpression func, ITreeAppendable b, boolean isReferenced)
b - the appendable, unused, but necessary for dispatching purposeisReferenced - unused, but necessary for dispatching purposepublic void _toJavaExpression(XExpression func, ITreeAppendable b)
b - the appendable, unused, but necessary for dispatching purposeprotected void serialize(JvmTypeReference type, org.eclipse.emf.ecore.EObject context, ITreeAppendable appendable)
protected void serialize(JvmTypeReference type, org.eclipse.emf.ecore.EObject context, ITreeAppendable appendable, boolean withoutConstraints, boolean paramsToWildcard)
protected void serialize(JvmTypeReference type, org.eclipse.emf.ecore.EObject context, ITreeAppendable 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, org.eclipse.emf.ecore.EObject context)
protected String getVarName(Object ex, ITreeAppendable appendable)
public void setNameProvider(IdentifiableSimpleNameProvider nameProvider)
protected IdentifiableSimpleNameProvider getNameProvider()
protected String getFavoriteVariableName(org.eclipse.emf.ecore.EObject ex)
protected boolean isJavaConformant(LightweightTypeReference left, LightweightTypeReference right)
protected void declareSyntheticVariable(XExpression expr, ITreeAppendable b)
protected String getDefaultValueLiteral(XExpression expr)
protected void declareFreshLocalVariable(XExpression expr, ITreeAppendable b, Later expression)
protected LightweightTypeReference getTypeForVariableDeclaration(XExpression expr)
protected boolean isVariableDeclarationRequired(XExpression expr, ITreeAppendable b)
expr - the checked expressionb - the appendable which represents the current compiler stateprotected String getReferenceName(XExpression expr, ITreeAppendable b)
null if the
expression hasn't been assigned to a local variable before.Copyright © 2015. All Rights Reserved.