Interface ILinkingCandidate
-
- All Superinterfaces:
IApplicableCandidate
- All Known Subinterfaces:
IConstructorLinkingCandidate,IFeatureLinkingCandidate,ITypeLiteralLinkingCandidate
- All Known Implementing Classes:
AbstractAmbiguousLinkingCandidate,AbstractImplicitFeature,AbstractLinkingCandidate,AbstractNullLinkingCandidate,AbstractPendingLinkingCandidate,AbstractResolvedReference,AbstractUnresolvableReference,AbstractUnresolvableReferenceWithNode,AmbiguousConstructorLinkingCandidate,AmbiguousFeatureLinkingCandidate,AppliedFeatureLinkingCandidate,ConstructorLinkingCandidate,FeatureLinkingCandidate,FollowUpError,ImplicitFirstArgument,ImplicitReceiver,NullConstructorLinkingCandidate,NullFeatureLinkingCandidate,ResolvedConstructor,ResolvedFeature,ResolvedImplicitFirstArgument,ResolvedImplicitReceiver,ResolvedTypeLiteral,SuspiciouslyOverloadedCandidate,TypeInsteadOfConstructorLinkingCandidate,TypeLiteralLinkingCandidate,UnresolvableConstructorCall,UnresolvableFeatureCall
public interface ILinkingCandidate extends IApplicableCandidate
A linking candidate encapsulates a linked feature. The link may be broken, e.g. the proxy cannot be resolved. It may even be the case that no suitable feature exists. Key to this abstraction is the possibility to compare two possible candidates with each other, apply the best match to the AST, and resolve the link on the EMF level. Furthermore it is possible to trigger the validation of an established link.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapplyToComputationState()Apply this candidate to the current computation state model.voidapplyToModel(IResolvedTypes resolvedTypes)Injects the resolved feature into the model with the same semantics as the implicitresolveof EMF.XExpressiongetExpression()The current expression that shall be linked.org.eclipse.xtext.common.types.JvmIdentifiableElementgetFeature()The currently considered feature (if any).ILinkingCandidategetPreferredCandidate(ILinkingCandidate other)Produces the best candidate for the current two candidates.java.util.List<LightweightTypeReference>getTypeArguments()The resolved type arguments.-
Methods inherited from interface org.eclipse.xtext.xbase.typesystem.computation.IApplicableCandidate
validate
-
-
-
-
Method Detail
-
applyToComputationState
void applyToComputationState()
Apply this candidate to the current computation state model. This propagates the type information about arguments and child expressions to the currently active resolution state.
-
applyToModel
void applyToModel(IResolvedTypes resolvedTypes)
Injects the resolved feature into the model with the same semantics as the implicitresolveof EMF. This implies that the linked feature call may still point to a proxy afterwards.- Specified by:
applyToModelin interfaceIApplicableCandidate
-
getPreferredCandidate
ILinkingCandidate getPreferredCandidate(ILinkingCandidate other)
Produces the best candidate for the current two candidates. It may turn out that both candidates (thisandother) 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 onapplyToComputationState(),applyToModel(IResolvedTypes), andIApplicableCandidate.validate(IAcceptor).
-
getFeature
org.eclipse.xtext.common.types.JvmIdentifiableElement getFeature()
The currently considered feature (if any). Otherwisenull.
-
getExpression
XExpression getExpression()
The current expression that shall be linked.
-
getTypeArguments
java.util.List<LightweightTypeReference> getTypeArguments()
The resolved type arguments.
-
-