public class ResolvedFeature extends AbstractResolvedReference<XAbstractFeatureCall> implements IFeatureLinkingCandidate
AbstractLinkingCandidate.ArgumentTypeComputationState, AbstractLinkingCandidate.ObservableTypeExpectationresolvedElementarguments, typeArguments| Constructor and Description |
|---|
ResolvedFeature(XAbstractFeatureCall featureCall,
org.eclipse.xtext.common.types.JvmIdentifiableElement feature,
FeatureLinkHelper helper,
ITypeExpectation expectation,
ExpressionTypeComputationState state) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyToComputationState()
Apply this candidate to the current computation state model.
|
protected void |
computeVarArgumentType(IFeatureCallArgumentSlot slot,
TypeParameterSubstitutor<?> substitutor) |
protected java.util.List<XExpression> |
getArguments() |
protected java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument> |
getDeclaratorParameterMapping() |
protected LightweightTypeReference |
getDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement feature) |
XAbstractFeatureCall |
getFeatureCall()
Returns the feature call that is linked.
|
protected XExpression |
getImplicitFirstArgument() |
protected LightweightTypeReference |
getImplicitFirstArgumentType() |
protected XExpression |
getImplicitReceiver() |
protected LightweightTypeReference |
getImplicitReceiverType() |
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeReference> |
getPlainSyntacticTypeArguments() |
ILinkingCandidate |
getPreferredCandidate(ILinkingCandidate other)
Produces the best candidate for the current two candidates.
|
protected XExpression |
getReceiver() |
protected LightweightTypeReference |
getReceiverType() |
protected LightweightTypeReference |
getSubstitutedExpectedType(int idx)
Returns the substituted expected type for the argument at
argumentIndex. |
protected java.util.List<XExpression> |
getSyntacticArguments()
For testing purpose
|
protected XExpression |
getSyntacticReceiver() |
protected LightweightTypeReference |
getSyntacticReceiverType() |
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. |
protected boolean |
isRawTypeContext() |
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 |
resolveAgainstActualType(LightweightTypeReference declaredType,
LightweightTypeReference actualType,
AbstractTypeComputationState state) |
protected void |
resolveArgumentType(XExpression argument,
LightweightTypeReference declaredType,
ITypeComputationState argumentState) |
protected void |
resolveKnownArgumentType(XExpression argument,
LightweightTypeReference knownType,
LightweightTypeReference declaredType,
ITypeComputationState argumentState) |
applyToModel, getFeature, getTypeParameterMapping, toString, validateaccept, computeArgumentType, computeArgumentTypes, computeFixedArityArgumentType, createArgumentTypeSubstitutor, createLinkingTypeComputationState, createVarArgTypeComputationState, deferredBindTypeArgument, discardRefinementTypeIfReassigned, getActualType, getActualType, getDeclaredTypeParameters, getExpectedType, getExpression, getState, getSyntacticTypeArguments, getTypeArguments, initializeArgumentTypeComputation, initializeConstraintMapping, initializeMapping, initializeTypeParameterMapping, initializeTypeParameterMapping, isBoundTypeArgumentSkipped, mustDiscardRefinement, preApplyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyToModel, getExpression, getFeature, getTypeArgumentsvalidatepublic ResolvedFeature(XAbstractFeatureCall featureCall, org.eclipse.xtext.common.types.JvmIdentifiableElement feature, FeatureLinkHelper helper, ITypeExpectation expectation, ExpressionTypeComputationState state)
public ILinkingCandidate getPreferredCandidate(ILinkingCandidate other)
ILinkingCandidatethis and other) are ambiguous
so no prefered candidate can be chosen. In that case, a new linking candidate
may be produced that carries this information and will use that on ILinkingCandidate.applyToComputationState(),
ILinkingCandidate.applyToModel(IResolvedTypes), and IApplicableCandidate.validate(IAcceptor).getPreferredCandidate in interface ILinkingCandidateprotected LightweightTypeReference getSubstitutedExpectedType(int idx)
AbstractLinkingCandidateargumentIndex.
If the expected type is an unbound type parameter, a reference to the type parameter
itself is returned.getSubstitutedExpectedType in class AbstractLinkingCandidate<XAbstractFeatureCall>public void applyToComputationState()
ILinkingCandidateapplyToComputationState in interface ILinkingCandidateapplyToComputationState in class AbstractLinkingCandidate<XAbstractFeatureCall>protected boolean isRawTypeContext()
isRawTypeContext in class AbstractLinkingCandidate<XAbstractFeatureCall>protected void resolveAgainstActualType(LightweightTypeReference declaredType, LightweightTypeReference actualType, AbstractTypeComputationState state)
resolveAgainstActualType in class AbstractLinkingCandidate<XAbstractFeatureCall>protected java.util.List<XExpression> getArguments()
getArguments in class AbstractLinkingCandidate<XAbstractFeatureCall>public XAbstractFeatureCall getFeatureCall()
IFeatureLinkingCandidategetFeatureCall in interface IFeatureLinkingCandidateprotected java.util.List<org.eclipse.xtext.common.types.JvmTypeReference> getPlainSyntacticTypeArguments()
getPlainSyntacticTypeArguments in class AbstractLinkingCandidate<XAbstractFeatureCall>protected void computeVarArgumentType(IFeatureCallArgumentSlot slot, TypeParameterSubstitutor<?> substitutor)
computeVarArgumentType in class AbstractLinkingCandidate<XAbstractFeatureCall>protected void resolveArgumentType(XExpression argument, LightweightTypeReference declaredType, ITypeComputationState argumentState)
resolveArgumentType in class AbstractLinkingCandidate<XAbstractFeatureCall>argument - the expression that should be processed.declaredType - the declared (expected) type for the given expression.argumentState - the to-be-used state to compute the actual type of the argument. It is already configured with the expectation.protected void resolveKnownArgumentType(XExpression argument, LightweightTypeReference knownType, LightweightTypeReference declaredType, ITypeComputationState argumentState)
protected java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument> getDeclaratorParameterMapping()
getDeclaratorParameterMapping in class AbstractLinkingCandidate<XAbstractFeatureCall>protected LightweightTypeReference getDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement feature)
getDeclaredType in class AbstractLinkingCandidate<XAbstractFeatureCall>protected XExpression getImplicitReceiver()
protected LightweightTypeReference getImplicitReceiverType()
protected XExpression getImplicitFirstArgument()
protected LightweightTypeReference getImplicitFirstArgumentType()
protected XExpression getReceiver()
protected LightweightTypeReference getReceiverType()
protected XExpression getSyntacticReceiver()
protected LightweightTypeReference getSyntacticReceiverType()
protected java.util.List<XExpression> getSyntacticArguments()
public boolean isExtension()
IFeatureLinkingCandidatetrue if the the linked feature is contributed
by an extension.isExtension in interface IFeatureLinkingCandidateprotected 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 IFeatureLinkingCandidatepublic boolean isTypeLiteral()
IFeatureLinkingCandidatetrue if the the feature call is linked as a type literal.isTypeLiteral in interface IFeatureLinkingCandidateisTypeLiteral in class AbstractLinkingCandidate<XAbstractFeatureCall>