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 voidapplyToComputationState()Apply this candidate to the current computation state model.protected voidapplyType()protected voidcomputeArgumentTypes()protected abstract java.util.List<XExpression>getArguments()org.eclipse.emf.ecore.EObjectgetContext()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.protected StackedResolvedTypesgetResolvedTypes()protected ExpressionTypeComputationStategetState()booleanvalidate(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:ILinkingCandidateThe current expression that shall be linked.- Specified by:
getExpressionin interfaceILinkingCandidate
-
applyToComputationState
public void applyToComputationState()
Description copied from interface:ILinkingCandidateApply 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:
applyToComputationStatein 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:IApplicableCandidateProduce diagnostics for this condidate. It is not the responsibility of this candidate to propagate the acceptor to its children.- Specified by:
validatein interfaceIApplicableCandidate- Returns:
trueif 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:ILinkingCandidateProduces 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 onILinkingCandidate.applyToComputationState(),ILinkingCandidate.applyToModel(IResolvedTypes), andIApplicableCandidate.validate(IAcceptor).- Specified by:
getPreferredCandidatein interfaceILinkingCandidate
-
getFeature
public org.eclipse.xtext.common.types.JvmIdentifiableElement getFeature()
Description copied from interface:ILinkingCandidateThe currently considered feature (if any). Otherwisenull.- Specified by:
getFeaturein interfaceILinkingCandidate
-
getContext
public org.eclipse.emf.ecore.EObject getContext()
-
-