public class TypeLiteralLinkingCandidate extends AbstractPendingLinkingCandidate<XAbstractFeatureCall> implements ITypeLiteralLinkingCandidate
AbstractLinkingCandidate.ArgumentTypeComputationState, AbstractLinkingCandidate.ObservableTypeExpectation
description
arguments, typeArguments
Constructor and Description |
---|
TypeLiteralLinkingCandidate(XAbstractFeatureCall featureCall,
IIdentifiableElementDescription description,
ITypeExpectation expectation,
ExpressionTypeComputationState state) |
Modifier and Type | Method and Description |
---|---|
void |
applyToModel(IResolvedTypes resolvedTypes)
Injects the resolved feature into the model with the same semantics as the implicit
resolve
of EMF. |
void |
computeArgumentTypes() |
protected ILinkingCandidate |
createAmbiguousLinkingCandidate(AbstractPendingLinkingCandidate<?> second)
Produce a candidate that carries the information about ambiguous candidates.
|
protected java.util.List<XExpression> |
getArguments()
Returns the actual arguments of the expression.
|
int |
getArityMismatch()
Returns the mismatch of actually given arguments and declared parameters.
|
protected int |
getConformanceFlags(int idx,
boolean recompute) |
protected LightweightTypeReference |
getDeclaredType(JvmIdentifiableElement feature) |
protected java.util.List<JvmTypeParameter> |
getDeclaredTypeParameters() |
XAbstractFeatureCall |
getFeatureCall()
Returns the feature call that is linked.
|
protected java.lang.String |
getFeatureTypeName()
Returns the name of the feature type, e.g. a feature of type
JvmOperation may
return method , a XVariableDeclaration may identify itself as local variable . |
protected java.util.List<JvmTypeReference> |
getPlainSyntacticTypeArguments() |
protected LightweightTypeReference |
getSubstitutedExpectedType(int argumentIndex)
Returns the substituted expected type for the argument at
argumentIndex . |
protected java.util.List<XExpression> |
getSyntacticArguments() |
JvmType |
getType()
Returns the type that shall be resolved as a literal.
|
protected int |
getTypeArgumentConformanceFailures(IAcceptor<? super AbstractDiagnostic> acceptor) |
java.util.List<LightweightTypeReference> |
getTypeArguments()
The resolved type arguments.
|
int |
getTypeArityMismatch() |
protected boolean |
hasReceiver()
Returns
true if the argument at index 0 will be considered as the receiver. |
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. |
protected void |
preApply() |
protected boolean |
validateTypeArity(IAcceptor<? super AbstractDiagnostic> result) |
compareByArgumentTypes, compareByArgumentTypes, compareByArgumentTypes, compareByArgumentTypesFlags, compareByArity, compareByArityWith, compareByBoxing, compareByBucket, compareByName, compareByTypeArguments, compareDeclaredTypes, compareExpectedArgumentTypes, compareTo, compareTo, createSuspiciousLinkingCandidate, getArgumentTypesAsString, getArityMismatch, getDefaultValidationFeature, getExpectedTypeCompareResultOther, getFeature, getFeatureParameterTypesAsString, getFeatureTypeParametersAsString, getInvalidArgumentsValidationFeature, getPreferredCandidate, getTypeArgumentsAsString, getTypeParameterAsString, getTypeParameterMapping, getUnhandledExceptionSeverity, isDefiniteEarlyExit, isLambdaExpression, isPossibleFunctionType, isVarArgs, isVisible, resolveLinkingProxy, toString, validate, validateArity, validateTypeArgumentConformance, validateUnhandledExceptions, validateUnhandledExceptions, validateVisibility
accept, applyToComputationState, computeArgumentType, computeFixedArityArgumentType, computeVarArgumentType, createArgumentTypeSubstitutor, createLinkingTypeComputationState, createVarArgTypeComputationState, deferredBindTypeArgument, discardRefinementTypeIfReassigned, getActualType, getActualType, getDeclaratorParameterMapping, getExpectedType, getExpression, getState, getSyntacticTypeArguments, initializeArgumentTypeComputation, initializeConstraintMapping, initializeMapping, initializeTypeParameterMapping, initializeTypeParameterMapping, isBoundTypeArgumentSkipped, isRawTypeContext, mustDiscardRefinement, resolveAgainstActualType, resolveArgumentType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
applyToComputationState, getExpression, getFeature, getPreferredCandidate
validate
public TypeLiteralLinkingCandidate(XAbstractFeatureCall featureCall, IIdentifiableElementDescription description, ITypeExpectation expectation, ExpressionTypeComputationState state)
public void computeArgumentTypes()
computeArgumentTypes
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected ILinkingCandidate createAmbiguousLinkingCandidate(AbstractPendingLinkingCandidate<?> second)
AbstractPendingLinkingCandidate
createAmbiguousLinkingCandidate
in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>
protected java.util.List<XExpression> getArguments()
getArguments
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected java.lang.String getFeatureTypeName()
AbstractPendingLinkingCandidate
JvmOperation
may
return method
, a XVariableDeclaration
may identify itself as local variable
.getFeatureTypeName
in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>
public int getArityMismatch()
AbstractPendingLinkingCandidate
getArityMismatch
in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>
protected java.util.List<XExpression> getSyntacticArguments()
getSyntacticArguments
in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>
public boolean isExtension()
IFeatureLinkingCandidate
true
if the the linked feature is contributed
by an extension.isExtension
in interface IFeatureLinkingCandidate
isExtension
in interface ITypeLiteralLinkingCandidate
isExtension
in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>
false
.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
isStatic
in interface ITypeLiteralLinkingCandidate
false
.public boolean isTypeLiteral()
IFeatureLinkingCandidate
true
if the the feature call is linked as a type literal.isTypeLiteral
in interface IFeatureLinkingCandidate
isTypeLiteral
in interface ITypeLiteralLinkingCandidate
isTypeLiteral
in class AbstractLinkingCandidate<XAbstractFeatureCall>
true
.public XAbstractFeatureCall getFeatureCall()
IFeatureLinkingCandidate
getFeatureCall
in interface IFeatureLinkingCandidate
protected java.util.List<JvmTypeReference> getPlainSyntacticTypeArguments()
getPlainSyntacticTypeArguments
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected int getConformanceFlags(int idx, boolean recompute)
getConformanceFlags
in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>
protected LightweightTypeReference getSubstitutedExpectedType(int argumentIndex)
AbstractLinkingCandidate
argumentIndex
.
If the expected type is an unbound type parameter, a reference to the type parameter
itself is returned.getSubstitutedExpectedType
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected boolean validateTypeArity(IAcceptor<? super AbstractDiagnostic> result)
validateTypeArity
in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>
protected LightweightTypeReference getDeclaredType(JvmIdentifiableElement feature)
getDeclaredType
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected java.util.List<JvmTypeParameter> getDeclaredTypeParameters()
getDeclaredTypeParameters
in class AbstractLinkingCandidate<XAbstractFeatureCall>
public int getTypeArityMismatch()
getTypeArityMismatch
in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>
protected int getTypeArgumentConformanceFailures(IAcceptor<? super AbstractDiagnostic> acceptor)
getTypeArgumentConformanceFailures
in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>
public java.util.List<LightweightTypeReference> getTypeArguments()
ILinkingCandidate
getTypeArguments
in interface ILinkingCandidate
getTypeArguments
in interface ITypeLiteralLinkingCandidate
getTypeArguments
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected void preApply()
preApply
in class AbstractLinkingCandidate<XAbstractFeatureCall>
public JvmType getType()
ITypeLiteralLinkingCandidate
getType
in interface ITypeLiteralLinkingCandidate
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