public class TypeLiteralLinkingCandidate extends AbstractPendingLinkingCandidate<XAbstractFeatureCall> implements ITypeLiteralLinkingCandidate
AbstractLinkingCandidate.ArgumentTypeComputationState, AbstractLinkingCandidate.ObservableTypeExpectationdescriptionarguments, typeArguments| Constructor and Description |
|---|
TypeLiteralLinkingCandidate(XAbstractFeatureCall featureCall,
IIdentifiableElementDescription description,
ITypeExpectation expectation,
ExpressionTypeComputationState state) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyToModel(IResolvedTypes resolvedTypes)
Injects the resolved feature into the model with the same semantics as the implicit
resolve
of EMF. |
void |
computeArgumentTypes() |
protected ILinkingCandidate |
createAmbiguousLinkingCandidate(AbstractPendingLinkingCandidate<?> second)
Produce a candidate that carries the information about ambiguous candidates.
|
protected java.util.List<XExpression> |
getArguments()
Returns the actual arguments of the expression.
|
int |
getArityMismatch()
Returns the mismatch of actually given arguments and declared parameters.
|
protected int |
getConformanceFlags(int idx,
boolean recompute) |
protected LightweightTypeReference |
getDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement feature) |
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> |
getDeclaredTypeParameters() |
XAbstractFeatureCall |
getFeatureCall()
Returns the feature call that is linked.
|
protected java.lang.String |
getFeatureTypeName()
Returns the name of the feature type, e.g.
|
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeReference> |
getPlainSyntacticTypeArguments() |
protected LightweightTypeReference |
getSubstitutedExpectedType(int argumentIndex)
Returns the substituted expected type for the argument at
argumentIndex. |
protected java.util.List<XExpression> |
getSyntacticArguments() |
org.eclipse.xtext.common.types.JvmType |
getType()
Returns the type that shall be resolved as a literal.
|
protected int |
getTypeArgumentConformanceFailures(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> acceptor) |
java.util.List<LightweightTypeReference> |
getTypeArguments()
The resolved type arguments.
|
int |
getTypeArityMismatch() |
protected boolean |
hasReceiver()
Returns
true if the argument at index 0 will be considered as the receiver. |
boolean |
isExtension()
Returns
true if the the linked feature is contributed
by an extension. |
boolean |
isStatic()
Returns
true if the the linked feature is static. |
boolean |
isTypeLiteral()
Returns
true if the the feature call is linked as a type literal. |
protected void |
preApply() |
protected boolean |
validateTypeArity(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result) |
compareByArgumentTypes, compareByArgumentTypes, compareByArgumentTypes, compareByArgumentTypesFlags, compareByArity, compareByArityWith, compareByBoxing, compareByBucket, compareByName, compareByTypeArguments, compareDeclaredTypes, compareExpectedArgumentTypes, compareTo, compareTo, createSuspiciousLinkingCandidate, getArgumentTypesAsString, getArityMismatch, getDefaultValidationFeature, getExpectedTypeCompareResultOther, getFeature, getFeatureParameterTypesAsString, getFeatureParameterTypesAsString, getFeatureTypeParametersAsString, getInvalidArgumentsValidationFeature, getPreferredCandidate, getSeverity, getSimpleFeatureName, getTypeArgumentsAsString, getTypeParameterAsString, getTypeParameterMapping, getUnhandledExceptionSeverity, isDefiniteEarlyExit, isLambdaExpression, isPossibleFunctionType, isVarArgs, isVisible, resolveLinkingProxy, toString, validate, validateArity, validateTypeArgumentConformance, validateUnhandledExceptions, validateUnhandledExceptions, validateVisibilityaccept, applyToComputationState, computeArgumentType, computeFixedArityArgumentType, computeVarArgumentType, createArgumentTypeSubstitutor, createLinkingTypeComputationState, createVarArgTypeComputationState, deferredBindTypeArgument, discardRefinementTypeIfReassigned, getActualType, getActualType, getDeclaratorParameterMapping, getExpectedType, getExpression, getState, getSyntacticTypeArguments, initializeArgumentTypeComputation, initializeConstraintMapping, initializeMapping, initializeTypeParameterMapping, initializeTypeParameterMapping, isBoundTypeArgumentSkipped, isRawTypeContext, mustDiscardRefinement, resolveAgainstActualType, resolveArgumentTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyToComputationState, getExpression, getFeature, getPreferredCandidatevalidatepublic TypeLiteralLinkingCandidate(XAbstractFeatureCall featureCall, IIdentifiableElementDescription description, ITypeExpectation expectation, ExpressionTypeComputationState state)
public void computeArgumentTypes()
computeArgumentTypes in class AbstractLinkingCandidate<XAbstractFeatureCall>protected ILinkingCandidate createAmbiguousLinkingCandidate(AbstractPendingLinkingCandidate<?> second)
AbstractPendingLinkingCandidatecreateAmbiguousLinkingCandidate in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>protected java.util.List<XExpression> getArguments()
getArguments in class AbstractLinkingCandidate<XAbstractFeatureCall>protected java.lang.String getFeatureTypeName()
AbstractPendingLinkingCandidateJvmOperation may
return method, a XVariableDeclaration may identify itself as local variable.getFeatureTypeName in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>public int getArityMismatch()
AbstractPendingLinkingCandidategetArityMismatch in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>protected java.util.List<XExpression> getSyntacticArguments()
getSyntacticArguments in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>public boolean isExtension()
IFeatureLinkingCandidatetrue if the the linked feature is contributed
by an extension.isExtension in interface IFeatureLinkingCandidateisExtension in interface ITypeLiteralLinkingCandidateisExtension in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>false.protected boolean hasReceiver()
AbstractLinkingCandidatetrue if the argument at index 0 will be considered as the receiver.hasReceiver in class AbstractLinkingCandidate<XAbstractFeatureCall>public boolean isStatic()
IFeatureLinkingCandidatetrue if the the linked feature is static.isStatic in interface IFeatureLinkingCandidateisStatic in interface ITypeLiteralLinkingCandidatefalse.public boolean isTypeLiteral()
IFeatureLinkingCandidatetrue if the the feature call is linked as a type literal.isTypeLiteral in interface IFeatureLinkingCandidateisTypeLiteral in interface ITypeLiteralLinkingCandidateisTypeLiteral in class AbstractLinkingCandidate<XAbstractFeatureCall>true.public XAbstractFeatureCall getFeatureCall()
IFeatureLinkingCandidategetFeatureCall in interface IFeatureLinkingCandidateprotected java.util.List<org.eclipse.xtext.common.types.JvmTypeReference> getPlainSyntacticTypeArguments()
getPlainSyntacticTypeArguments in class AbstractLinkingCandidate<XAbstractFeatureCall>protected int getConformanceFlags(int idx,
boolean recompute)
getConformanceFlags in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>protected LightweightTypeReference getSubstitutedExpectedType(int argumentIndex)
AbstractLinkingCandidateargumentIndex.
If the expected type is an unbound type parameter, a reference to the type parameter
itself is returned.getSubstitutedExpectedType in class AbstractLinkingCandidate<XAbstractFeatureCall>protected boolean validateTypeArity(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
validateTypeArity in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>protected LightweightTypeReference getDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement feature)
getDeclaredType in class AbstractLinkingCandidate<XAbstractFeatureCall>protected java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> getDeclaredTypeParameters()
getDeclaredTypeParameters in class AbstractLinkingCandidate<XAbstractFeatureCall>public int getTypeArityMismatch()
getTypeArityMismatch in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>protected int getTypeArgumentConformanceFailures(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> acceptor)
getTypeArgumentConformanceFailures in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>public java.util.List<LightweightTypeReference> getTypeArguments()
ILinkingCandidategetTypeArguments in interface ILinkingCandidategetTypeArguments in interface ITypeLiteralLinkingCandidategetTypeArguments in class AbstractLinkingCandidate<XAbstractFeatureCall>protected void preApply()
preApply in class AbstractLinkingCandidate<XAbstractFeatureCall>public org.eclipse.xtext.common.types.JvmType getType()
ITypeLiteralLinkingCandidategetType in interface ITypeLiteralLinkingCandidatepublic void applyToModel(IResolvedTypes resolvedTypes)
ILinkingCandidateresolve
of EMF. This implies that the linked feature call may still point to a proxy afterwards.applyToModel in interface IApplicableCandidateapplyToModel in interface ILinkingCandidate