@NonNullByDefault 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()
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 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<XExpression> |
getSyntacticArguments() |
protected java.util.List<LightweightTypeReference> |
getSyntacticTypeArguments() |
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. |
protected void |
internalSetValue(org.eclipse.emf.ecore.InternalEObject featureCall,
org.eclipse.emf.ecore.EReference structuralFeature,
JvmIdentifiableElement newValue) |
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() |
compareByArgumentTypes, compareByArgumentTypes, compareByArgumentTypes, compareByArgumentTypes, compareByArity, compareByArityWith, compareByBucket, compareByTypeArguments, compareExpectedArgumentTypes, compareTo, createSuspiciousLinkingCandidate, getArgumentTypesAsString, getArityMismatch, getConformanceHints, getDefaultValidationFeature, getExpectedTypeCompareResultOther, getFeature, getFeatureParameterTypesAsString, getFeatureTypeParametersAsString, getInvalidArgumentsValidationFeature, getPreferredCandidate, getTypeArgumentsAsString, getTypeParameterAsString, getTypeParameterMapping, isDefiniteEarlyExit, isVarArgs, isVisible, resolveLinkingProxy, resolveLinkingProxy, toString, validate, validateArity, validateTypeArgumentConformance, validateTypeArity, validateUnhandledExceptions, validateUnhandledExceptions, validateVisibility
accept, applyToComputationState, computeArgumentType, computeFixedArityArgumentType, computeVarArgumentType, createArgumentTypeSubstitutor, createLinkingTypeComputationState, createVarArgTypeComputationState, deferredBindTypeArgument, getActualType, getActualType, getDeclaratorParameterMapping, getExpectedType, getExpression, getState, getSubstitutedExpectedType, initializeArgumentTypeComputation, initializeConstraintMapping, initializeMapping, initializeTypeParameterMapping, initializeTypeParameterMapping, isBoundTypeArgumentSkipped, isRawTypeContext, 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<LightweightTypeReference> getSyntacticTypeArguments()
getSyntacticTypeArguments
in class AbstractLinkingCandidate<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(@Nullable 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()
ILinkingCandidate
resolve
of EMF. This implies that the linked feature call may still point to a proxy afterwards.applyToModel
in interface ILinkingCandidate
protected void internalSetValue(org.eclipse.emf.ecore.InternalEObject featureCall, org.eclipse.emf.ecore.EReference structuralFeature, JvmIdentifiableElement newValue)
internalSetValue
in class AbstractPendingLinkingCandidate<XAbstractFeatureCall>