@NonNullByDefault public class ResolvedFeature extends AbstractResolvedReference<XAbstractFeatureCall> implements IFeatureLinkingCandidate
AbstractLinkingCandidate.ArgumentTypeComputationState, AbstractLinkingCandidate.ObservableTypeExpectation
resolvedElement
arguments, typeArguments
Constructor and Description |
---|
ResolvedFeature(XAbstractFeatureCall featureCall,
JvmIdentifiableElement feature,
FeatureLinkHelper helper,
ExpressionTypeComputationState state) |
applyToModel, getFeature, getTypeParameterMapping, toString, validate
accept, computeArgumentType, computeArgumentTypes, computeFixedArityArgumentType, computeVarArgumentType, createArgumentTypeSubstitutor, createLinkingTypeComputationState, createVarArgTypeComputationState, deferredBindTypeArgument, getActualType, getActualType, getDeclaredTypeParameters, getExpectedType, getExpression, getState, getTypeArguments, initializeArgumentTypeComputation, initializeConstraintMapping, initializeMapping, initializeTypeParameterMapping, initializeTypeParameterMapping, isBoundTypeArgumentSkipped, preApply
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
applyToModel, getExpression, getFeature, getTypeArguments, validate
public ResolvedFeature(XAbstractFeatureCall featureCall, JvmIdentifiableElement feature, FeatureLinkHelper helper, ExpressionTypeComputationState state)
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()
, and ILinkingCandidate.validate(IAcceptor)
.getPreferredCandidate
in interface ILinkingCandidate
getPreferredCandidate
in class AbstractLinkingCandidate<XAbstractFeatureCall>
@Nullable protected LightweightTypeReference getSubstitutedExpectedType(int idx)
getSubstitutedExpectedType
in class AbstractLinkingCandidate<XAbstractFeatureCall>
public void applyToComputationState()
ILinkingCandidate
applyToComputationState
in interface ILinkingCandidate
applyToComputationState
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected boolean isRawTypeContext()
isRawTypeContext
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected void resolveAgainstActualType(LightweightTypeReference declaredType, LightweightTypeReference actualType, AbstractTypeComputationState state)
resolveAgainstActualType
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected java.util.List<XExpression> getArguments()
getArguments
in class AbstractLinkingCandidate<XAbstractFeatureCall>
public XAbstractFeatureCall getFeatureCall()
IFeatureLinkingCandidate
getFeatureCall
in interface IFeatureLinkingCandidate
protected java.util.List<LightweightTypeReference> getSyntacticTypeArguments()
getSyntacticTypeArguments
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected void resolveArgumentType(XExpression argument, @Nullable LightweightTypeReference declaredType, ITypeComputationState argumentState)
resolveArgumentType
in class AbstractLinkingCandidate<XAbstractFeatureCall>
argument
- the expression that should be processed.declaredType
- the declared (expected) type for the given expression.argumentState
- the to-be-used state to compute the actual type of the argument. It is already configured with the expectation.protected void resolveKnownArgumentType(XExpression argument, LightweightTypeReference knownType, @Nullable LightweightTypeReference declaredType, ITypeComputationState argumentState)
protected java.util.Map<JvmTypeParameter,LightweightMergedBoundTypeArgument> getDeclaratorParameterMapping()
getDeclaratorParameterMapping
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected LightweightTypeReference getDeclaredType(JvmIdentifiableElement feature)
getDeclaredType
in class AbstractLinkingCandidate<XAbstractFeatureCall>
@Nullable protected XExpression getImplicitReceiver()
@Nullable protected LightweightTypeReference getImplicitReceiverType()
@Nullable protected XExpression getImplicitFirstArgument()
@Nullable protected LightweightTypeReference getImplicitFirstArgumentType()
@Nullable protected XExpression getReceiver()
@Nullable protected LightweightTypeReference getReceiverType()
@Nullable protected XExpression getSyntacticReceiver()
@Nullable protected LightweightTypeReference getSyntacticReceiverType()
protected java.util.List<XExpression> getSyntacticArguments()
public boolean isExtension()
IFeatureLinkingCandidate
true
if the the linked feature is contributed
by an extension.isExtension
in interface IFeatureLinkingCandidate
protected boolean hasReceiver()
AbstractLinkingCandidate
true
if the argument at index 0 will be considered as the receiver.hasReceiver
in class AbstractLinkingCandidate<XAbstractFeatureCall>
public boolean isStatic()
IFeatureLinkingCandidate
true
if the the linked feature is static.isStatic
in interface IFeatureLinkingCandidate
public boolean isTypeLiteral()
IFeatureLinkingCandidate
true
if the the feature call is linked as a type literal.isTypeLiteral
in interface IFeatureLinkingCandidate
isTypeLiteral
in class AbstractLinkingCandidate<XAbstractFeatureCall>