public abstract class AbstractImplicitFeature extends java.lang.Object implements IFeatureLinkingCandidate
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractImplicitFeature(XAbstractFeatureCall featureCall,
XAbstractFeatureCall implicit,
ExpressionTypeComputationState state) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyToComputationState()
Apply this candidate to the current computation state model.
|
XExpression |
getExpression()
The current expression that shall be linked.
|
org.eclipse.xtext.common.types.JvmIdentifiableElement |
getFeature()
The currently considered feature (if any).
|
XAbstractFeatureCall |
getFeatureCall()
Returns the feature call that is linked.
|
protected XAbstractFeatureCall |
getOwner() |
ILinkingCandidate |
getPreferredCandidate(ILinkingCandidate other)
Produces the best candidate for the current two candidates.
|
protected ExpressionTypeComputationState |
getState() |
java.util.List<LightweightTypeReference> |
getTypeArguments()
The resolved type arguments.
|
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. |
boolean |
validate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
Produce diagnostics for this condidate.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyToModelprotected AbstractImplicitFeature(XAbstractFeatureCall featureCall, XAbstractFeatureCall implicit, ExpressionTypeComputationState state)
protected ExpressionTypeComputationState getState()
public void applyToComputationState()
ILinkingCandidateapplyToComputationState in interface ILinkingCandidateprotected XAbstractFeatureCall getOwner()
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 ILinkingCandidatepublic org.eclipse.xtext.common.types.JvmIdentifiableElement getFeature()
ILinkingCandidatenull.getFeature in interface ILinkingCandidatepublic boolean validate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
IApplicableCandidatevalidate in interface IApplicableCandidatetrue if further validation should be performed.public java.util.List<LightweightTypeReference> getTypeArguments()
ILinkingCandidategetTypeArguments in interface ILinkingCandidatepublic XAbstractFeatureCall getFeatureCall()
IFeatureLinkingCandidategetFeatureCall in interface IFeatureLinkingCandidatepublic XExpression getExpression()
ILinkingCandidategetExpression in interface ILinkingCandidatepublic 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 IFeatureLinkingCandidatepublic boolean isExtension()
IFeatureLinkingCandidatetrue if the the linked feature is contributed
by an extension.isExtension in interface IFeatureLinkingCandidate