public class AppliedFeatureLinkingCandidate extends java.lang.Object implements IFeatureLinkingCandidate
Modifier | Constructor and Description |
---|---|
protected |
AppliedFeatureLinkingCandidate(IFeatureLinkingCandidate delegate) |
Modifier and Type | Method and Description |
---|---|
void |
applyToComputationState()
Apply this candidate to the current computation state model.
|
void |
applyToModel(IResolvedTypes resolvedTypes)
Injects the resolved feature into the model with the same semantics as the implicit
resolve
of EMF. |
XExpression |
getExpression()
The current expression that shall be linked.
|
JvmIdentifiableElement |
getFeature()
The currently considered feature (if any).
|
XAbstractFeatureCall |
getFeatureCall()
Returns the feature call that is linked.
|
ILinkingCandidate |
getPreferredCandidate(ILinkingCandidate other)
Produces the best candidate for the current two candidates.
|
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(IAcceptor<? super AbstractDiagnostic> result)
Produce diagnostics for this condidate.
|
protected AppliedFeatureLinkingCandidate(IFeatureLinkingCandidate delegate)
public void applyToComputationState()
ILinkingCandidate
applyToComputationState
in interface ILinkingCandidate
public void applyToModel(IResolvedTypes resolvedTypes)
ILinkingCandidate
resolve
of EMF. This implies that the linked feature call may still point to a proxy afterwards.applyToModel
in interface IApplicableCandidate
applyToModel
in interface ILinkingCandidate
public boolean validate(IAcceptor<? super AbstractDiagnostic> result)
IApplicableCandidate
validate
in interface IApplicableCandidate
true
if further validation should be performed.public ILinkingCandidate getPreferredCandidate(ILinkingCandidate other)
ILinkingCandidate
this
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 ILinkingCandidate
public JvmIdentifiableElement getFeature()
ILinkingCandidate
null
.getFeature
in interface ILinkingCandidate
public java.util.List<LightweightTypeReference> getTypeArguments()
ILinkingCandidate
getTypeArguments
in interface ILinkingCandidate
public XExpression getExpression()
ILinkingCandidate
getExpression
in interface ILinkingCandidate
public XAbstractFeatureCall getFeatureCall()
IFeatureLinkingCandidate
getFeatureCall
in interface IFeatureLinkingCandidate
public boolean isStatic()
IFeatureLinkingCandidate
true
if the the linked feature is static.isStatic
in interface IFeatureLinkingCandidate
public boolean isExtension()
IFeatureLinkingCandidate
true
if the the linked feature is contributed
by an extension.isExtension
in interface IFeatureLinkingCandidate
public boolean isTypeLiteral()
IFeatureLinkingCandidate
true
if the the feature call is linked as a type literal.isTypeLiteral
in interface IFeatureLinkingCandidate