Package org.eclipse.xtend.core.jvmmodel
Class XtendJvmModelInferrer
- java.lang.Object
-
- org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
-
- org.eclipse.xtend.core.jvmmodel.XtendJvmModelInferrer
-
- All Implemented Interfaces:
org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
public class XtendJvmModelInferrer extends org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CREATE_CHACHE_VARIABLE_PREFIX
static java.lang.String
CREATE_INITIALIZER_PREFIX
-
Constructor Summary
Constructors Constructor Description XtendJvmModelInferrer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addDefaultConstructor(XtendClass source, org.eclipse.xtext.common.types.JvmGenericType target)
protected void
appendSyntheticDispatchMethods(XtendTypeDeclaration source, org.eclipse.xtext.common.types.JvmGenericType target)
protected java.lang.String
computeFieldName(XtendField field)
protected void
copyAndFixTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters, org.eclipse.xtext.common.types.JvmTypeParameterDeclarator target)
protected void
copyTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters, org.eclipse.xtext.common.types.JvmTypeParameterDeclarator target)
protected org.eclipse.xtext.common.types.JvmOperation
deriveGenericDispatchOperationSignature(java.lang.Iterable<org.eclipse.xtext.common.types.JvmOperation> localOperations, org.eclipse.xtext.common.types.JvmGenericType target)
protected org.eclipse.xtext.common.types.JvmDeclaredType
doInferTypeSceleton(XtendTypeDeclaration declaration, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean preIndexingPhase, XtendFile xtendFile, java.util.List<java.lang.Runnable> doLater)
protected void
fixTypeParameters(org.eclipse.xtext.common.types.JvmTypeParameterDeclarator target)
protected boolean
hasAdditionalMembers(AnonymousClass anonymousClass)
void
infer(org.eclipse.emf.ecore.EObject object, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean preIndexingPhase)
void
inferLocalClass(AnonymousClass anonymousClass, java.lang.String localClassName, org.eclipse.xtext.common.types.JvmFeature container)
Anonymous classes are not inferred in the type inference phase, but later during type resolution.protected void
inferTypeSceleton(XtendTypeDeclaration declaration, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean preIndexingPhase, XtendFile xtendFile, java.util.List<java.lang.Runnable> doLater, org.eclipse.xtext.common.types.JvmDeclaredType containerSceleton)
protected void
initialize(XtendAnnotationType source, org.eclipse.xtext.common.types.JvmAnnotationType inferredJvmType)
protected void
initialize(XtendClass source, org.eclipse.xtext.common.types.JvmGenericType inferredJvmType)
protected void
initialize(XtendEnum source, org.eclipse.xtext.common.types.JvmEnumerationType inferredJvmType)
protected void
initialize(XtendInterface source, org.eclipse.xtext.common.types.JvmGenericType inferredJvmType)
protected boolean
isTopLevel(XtendTypeDeclaration declaration)
protected void
setBody(org.eclipse.xtext.common.types.JvmExecutable executable, org.eclipse.xtext.xbase.XExpression expression)
protected void
setFileHeader(XtendFile xtendFile, org.eclipse.xtext.common.types.JvmDeclaredType jvmDeclaredType)
protected void
setNameAndAssociate(XtendFile file, XtendTypeDeclaration xtendType, org.eclipse.xtext.common.types.JvmDeclaredType javaType)
protected void
setOverride(org.eclipse.xtext.common.types.JvmOperation operation)
protected void
transform(XtendConstructor source, org.eclipse.xtext.common.types.JvmGenericType container)
protected void
transform(XtendEnumLiteral literal, org.eclipse.xtext.common.types.JvmEnumerationType container)
protected void
transform(XtendField source, org.eclipse.xtext.common.types.JvmGenericType container)
protected void
transform(XtendFunction source, org.eclipse.xtext.common.types.JvmGenericType container, boolean allowDispatch)
protected void
transform(XtendMember sourceMember, org.eclipse.xtext.common.types.JvmGenericType container, boolean allowDispatch)
protected void
transformCreateExtension(XtendFunction source, CreateExtensionInfo createExtensionInfo, org.eclipse.xtext.common.types.JvmGenericType container, org.eclipse.xtext.common.types.JvmOperation operation, org.eclipse.xtext.common.types.JvmTypeReference returnType)
protected void
translateAnnotationsTo(java.util.List<org.eclipse.xtext.xbase.annotations.xAnnotations.XAnnotation> annotations, org.eclipse.xtext.common.types.JvmAnnotationTarget target)
protected void
translateParameter(org.eclipse.xtext.common.types.JvmExecutable executable, XtendParameter parameter)
-
-
-
Field Detail
-
CREATE_INITIALIZER_PREFIX
public static final java.lang.String CREATE_INITIALIZER_PREFIX
- See Also:
- Constant Field Values
-
CREATE_CHACHE_VARIABLE_PREFIX
public static final java.lang.String CREATE_CHACHE_VARIABLE_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
infer
public void infer(org.eclipse.emf.ecore.EObject object, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean preIndexingPhase)
- Specified by:
infer
in interfaceorg.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
- Overrides:
infer
in classorg.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
-
inferTypeSceleton
protected void inferTypeSceleton(XtendTypeDeclaration declaration, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean preIndexingPhase, XtendFile xtendFile, java.util.List<java.lang.Runnable> doLater, org.eclipse.xtext.common.types.JvmDeclaredType containerSceleton)
-
doInferTypeSceleton
protected org.eclipse.xtext.common.types.JvmDeclaredType doInferTypeSceleton(XtendTypeDeclaration declaration, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean preIndexingPhase, XtendFile xtendFile, java.util.List<java.lang.Runnable> doLater)
-
setNameAndAssociate
protected void setNameAndAssociate(XtendFile file, XtendTypeDeclaration xtendType, org.eclipse.xtext.common.types.JvmDeclaredType javaType)
-
setFileHeader
protected void setFileHeader(XtendFile xtendFile, org.eclipse.xtext.common.types.JvmDeclaredType jvmDeclaredType)
-
initialize
protected void initialize(XtendAnnotationType source, org.eclipse.xtext.common.types.JvmAnnotationType inferredJvmType)
-
translateAnnotationsTo
protected void translateAnnotationsTo(java.util.List<org.eclipse.xtext.xbase.annotations.xAnnotations.XAnnotation> annotations, org.eclipse.xtext.common.types.JvmAnnotationTarget target)
-
initialize
protected void initialize(XtendClass source, org.eclipse.xtext.common.types.JvmGenericType inferredJvmType)
-
initialize
protected void initialize(XtendInterface source, org.eclipse.xtext.common.types.JvmGenericType inferredJvmType)
-
initialize
protected void initialize(XtendEnum source, org.eclipse.xtext.common.types.JvmEnumerationType inferredJvmType)
-
isTopLevel
protected boolean isTopLevel(XtendTypeDeclaration declaration)
-
copyAndFixTypeParameters
protected void copyAndFixTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters, org.eclipse.xtext.common.types.JvmTypeParameterDeclarator target)
-
copyTypeParameters
protected void copyTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters, org.eclipse.xtext.common.types.JvmTypeParameterDeclarator target)
-
fixTypeParameters
protected void fixTypeParameters(org.eclipse.xtext.common.types.JvmTypeParameterDeclarator target)
-
appendSyntheticDispatchMethods
protected void appendSyntheticDispatchMethods(XtendTypeDeclaration source, org.eclipse.xtext.common.types.JvmGenericType target)
-
deriveGenericDispatchOperationSignature
protected org.eclipse.xtext.common.types.JvmOperation deriveGenericDispatchOperationSignature(java.lang.Iterable<org.eclipse.xtext.common.types.JvmOperation> localOperations, org.eclipse.xtext.common.types.JvmGenericType target)
- Returns:
- a
JvmOperation
with common denominator argument types of all given operations
-
addDefaultConstructor
protected void addDefaultConstructor(XtendClass source, org.eclipse.xtext.common.types.JvmGenericType target)
-
transform
protected void transform(XtendMember sourceMember, org.eclipse.xtext.common.types.JvmGenericType container, boolean allowDispatch)
-
transform
protected void transform(XtendFunction source, org.eclipse.xtext.common.types.JvmGenericType container, boolean allowDispatch)
-
setOverride
protected void setOverride(org.eclipse.xtext.common.types.JvmOperation operation)
-
setBody
protected void setBody(org.eclipse.xtext.common.types.JvmExecutable executable, org.eclipse.xtext.xbase.XExpression expression)
-
transformCreateExtension
protected void transformCreateExtension(XtendFunction source, CreateExtensionInfo createExtensionInfo, org.eclipse.xtext.common.types.JvmGenericType container, org.eclipse.xtext.common.types.JvmOperation operation, org.eclipse.xtext.common.types.JvmTypeReference returnType)
-
translateParameter
protected void translateParameter(org.eclipse.xtext.common.types.JvmExecutable executable, XtendParameter parameter)
-
transform
protected void transform(XtendConstructor source, org.eclipse.xtext.common.types.JvmGenericType container)
-
transform
protected void transform(XtendField source, org.eclipse.xtext.common.types.JvmGenericType container)
-
transform
protected void transform(XtendEnumLiteral literal, org.eclipse.xtext.common.types.JvmEnumerationType container)
-
computeFieldName
protected java.lang.String computeFieldName(XtendField field)
-
inferLocalClass
public void inferLocalClass(AnonymousClass anonymousClass, java.lang.String localClassName, org.eclipse.xtext.common.types.JvmFeature container)
Anonymous classes are not inferred in the type inference phase, but later during type resolution.
-
hasAdditionalMembers
protected boolean hasAdditionalMembers(AnonymousClass anonymousClass)
-
-