org.eclipse.xtext.xtend2.jvmmodel
Class Xtend2JvmModelInferrer
java.lang.Object
org.eclipse.xtext.xtend2.jvmmodel.Xtend2JvmModelInferrer
- All Implemented Interfaces:
- IJvmModelInferrer
public class Xtend2JvmModelInferrer
- extends java.lang.Object
- implements IJvmModelInferrer
- Author:
- Jan Koehnlein - Initial contribution and API, Sven Efftinge
Method Summary |
protected void |
addConstructor(XtendClass source,
JvmGenericType target)
|
protected void |
appendSyntheticDispatchMethods(XtendClass source,
JvmGenericType target)
|
protected java.lang.String |
computeFieldName(XtendField field,
JvmGenericType declaringType)
|
protected void |
computeInferredReturnTypes(JvmGenericType inferredJvmType)
|
protected void |
copyAndFixTypeParameters(java.util.List<JvmTypeParameter> typeParameters,
JvmTypeParameterDeclarator target)
|
protected JvmOperation |
deriveGenericDispatchOperationSignature(java.util.List<JvmOperation> sortedOperations,
JvmGenericType target)
|
protected JvmTypeReference |
getTypeProxy(org.eclipse.emf.ecore.EObject pointer)
|
void |
infer(org.eclipse.emf.ecore.EObject xtendFile,
IAcceptor<JvmDeclaredType> acceptor,
boolean prelinkingPhase)
is called for the root element of a resource just once. |
protected JvmGenericType |
transform(XtendClass source,
boolean prelinkingPhase)
|
protected JvmMember |
transform(XtendField source,
JvmGenericType container)
|
protected JvmMember |
transform(XtendFunction source,
JvmGenericType container)
|
protected JvmMember |
transform(XtendMember sourceMember,
JvmGenericType container)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
typesFactory
@Inject
protected TypesFactory typesFactory
Xtend2JvmModelInferrer
public Xtend2JvmModelInferrer()
infer
public void infer(org.eclipse.emf.ecore.EObject xtendFile,
IAcceptor<JvmDeclaredType> acceptor,
boolean prelinkingPhase)
- Description copied from interface:
IJvmModelInferrer
- is called for the root element of a resource just once.
- Specified by:
infer
in interface IJvmModelInferrer
- Parameters:
xtendFile
- - the root element from the parse resultacceptor
- - an acceptor awaiting derived JvmDeclaredType
sprelinkingPhase
- - whether the call is done in a pre-linking phase. During this phase clients may not do linking which
relies on indexed information, because the index might not be fully computed yet.
transform
protected JvmGenericType transform(XtendClass source,
boolean prelinkingPhase)
copyAndFixTypeParameters
protected void copyAndFixTypeParameters(java.util.List<JvmTypeParameter> typeParameters,
JvmTypeParameterDeclarator target)
appendSyntheticDispatchMethods
protected void appendSyntheticDispatchMethods(XtendClass source,
JvmGenericType target)
deriveGenericDispatchOperationSignature
protected JvmOperation deriveGenericDispatchOperationSignature(java.util.List<JvmOperation> sortedOperations,
JvmGenericType target)
- Returns:
- a
JvmOperation
with common denominator argument types of all given operations
addConstructor
protected void addConstructor(XtendClass source,
JvmGenericType target)
transform
protected JvmMember transform(XtendMember sourceMember,
JvmGenericType container)
transform
protected JvmMember transform(XtendFunction source,
JvmGenericType container)
transform
protected JvmMember transform(XtendField source,
JvmGenericType container)
computeFieldName
protected java.lang.String computeFieldName(XtendField field,
JvmGenericType declaringType)
computeInferredReturnTypes
protected void computeInferredReturnTypes(JvmGenericType inferredJvmType)
getTypeProxy
protected JvmTypeReference getTypeProxy(org.eclipse.emf.ecore.EObject pointer)