Class AbstractUnresolvableReference
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractUnresolvableReference
-
- All Implemented Interfaces:
IApplicableCandidate
,ILinkingCandidate
- Direct Known Subclasses:
AbstractUnresolvableReferenceWithNode
,FollowUpError
,TypeInsteadOfConstructorLinkingCandidate
public abstract class AbstractUnresolvableReference extends java.lang.Object implements ILinkingCandidate
-
-
Constructor Summary
Constructors Constructor Description AbstractUnresolvableReference(XExpression expression, ExpressionTypeComputationState state)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
applyToComputationState()
Apply this candidate to the current computation state model.protected void
applyType()
protected void
computeArgumentTypes()
protected abstract java.util.List<XExpression>
getArguments()
org.eclipse.emf.ecore.EObject
getContext()
XExpression
getExpression()
The current expression that shall be linked.org.eclipse.xtext.common.types.JvmIdentifiableElement
getFeature()
The currently considered feature (if any).ILinkingCandidate
getPreferredCandidate(ILinkingCandidate other)
Produces the best candidate for the current two candidates.protected StackedResolvedTypes
getResolvedTypes()
protected ExpressionTypeComputationState
getState()
boolean
validate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
Produce diagnostics for this condidate.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.xtext.xbase.typesystem.computation.ILinkingCandidate
applyToModel, getTypeArguments
-
-
-
-
Constructor Detail
-
AbstractUnresolvableReference
public AbstractUnresolvableReference(XExpression expression, ExpressionTypeComputationState state)
-
-
Method Detail
-
getExpression
public XExpression getExpression()
Description copied from interface:ILinkingCandidate
The current expression that shall be linked.- Specified by:
getExpression
in interfaceILinkingCandidate
-
applyToComputationState
public void applyToComputationState()
Description copied from interface:ILinkingCandidate
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.- Specified by:
applyToComputationState
in interfaceILinkingCandidate
-
applyType
protected void applyType()
-
getState
protected ExpressionTypeComputationState getState()
-
getResolvedTypes
protected StackedResolvedTypes getResolvedTypes()
-
validate
public boolean validate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
Description copied from interface:IApplicableCandidate
Produce diagnostics for this condidate. It is not the responsibility of this candidate to propagate the acceptor to its children.- Specified by:
validate
in interfaceIApplicableCandidate
- Returns:
true
if further validation should be performed.
-
computeArgumentTypes
protected void computeArgumentTypes()
-
getArguments
protected abstract java.util.List<XExpression> getArguments()
-
getPreferredCandidate
public ILinkingCandidate getPreferredCandidate(ILinkingCandidate other)
Description copied from interface:ILinkingCandidate
Produces the best candidate for the current two candidates. It may turn out that both candidates (this
andother
) 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 onILinkingCandidate.applyToComputationState()
,ILinkingCandidate.applyToModel(IResolvedTypes)
, andIApplicableCandidate.validate(IAcceptor)
.- Specified by:
getPreferredCandidate
in interfaceILinkingCandidate
-
getFeature
public org.eclipse.xtext.common.types.JvmIdentifiableElement getFeature()
Description copied from interface:ILinkingCandidate
The currently considered feature (if any). Otherwisenull
.- Specified by:
getFeature
in interfaceILinkingCandidate
-
getContext
public org.eclipse.emf.ecore.EObject getContext()
-
-