Class FeatureLinkingCandidate
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractLinkingCandidate<Expression>
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
- org.eclipse.xtext.xbase.typesystem.internal.FeatureLinkingCandidate
-
- All Implemented Interfaces:
IFeatureNames,IApplicableCandidate,IFeatureLinkingCandidate,ILinkingCandidate
public class FeatureLinkingCandidate extends AbstractPendingLinkingCandidate<XAbstractFeatureCall> implements IFeatureLinkingCandidate, IFeatureNames
A linking candidate that represents a feature call and allows to resolve overloaded members.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractLinkingCandidate
AbstractLinkingCandidate.ArgumentTypeComputationState, AbstractLinkingCandidate.ObservableTypeExpectation
-
-
Field Summary
-
Fields inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractPendingLinkingCandidate
description
-
Fields inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractLinkingCandidate
arguments, typeArguments
-
Fields inherited from interface org.eclipse.xtext.xbase.scoping.batch.IFeatureNames
IT, SELF, SUPER, THIS
-
-
Constructor Summary
Constructors Constructor Description FeatureLinkingCandidate(XAbstractFeatureCall featureCall, IIdentifiableElementDescription description, ITypeExpectation expectation, ExpressionTypeComputationState state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyImplicitReceiver()voidapplyToModel(IResolvedTypes resolvedTypes)Injects the resolved feature into the model with the same semantics as the implicitresolveof EMF.protected CandidateCompareResultcompareByArgumentTypes(AbstractPendingLinkingCandidate<?> right)protected CandidateCompareResultcompareByArgumentTypes(AbstractPendingLinkingCandidate<?> right, boolean recompute)protected CandidateCompareResultcompareByArgumentTypes(AbstractPendingLinkingCandidate<?> right, int leftBoxing, int rightBoxing, int leftDemand, int rightDemand)Compare this linking candidate with the givenothercandidate atargumentIndexReturnsCandidateCompareResult#THISif this candidate is better,CandidateCompareResult#OTHERif the right candidate was better,CandidateCompareResult#AMBIGUOUSif both candidates are valid but ambiguous orCandidateCompareResult#EQUALLY_INVALIDif both candidates are ambiguous but erroneous.protected CandidateCompareResultcompareByArgumentTypes(FeatureLinkingCandidate right, int leftBoxing, int rightBoxing)protected CandidateCompareResultcompareByArgumentTypesAndStaticFlag(FeatureLinkingCandidate right, int leftBoxing, int rightBoxing)protected CandidateCompareResultcompareByArgumentTypesFlags(AbstractPendingLinkingCandidate<?> right, int leftIdx, int rightIdx, int leftConformance, int rightConformance)Compare this linking candidate with the givenothercandidate atleftIdxandrightIdxrespectively.protected CandidateCompareResultcompareByArityWith(AbstractPendingLinkingCandidate<?> right)protected CandidateCompareResultcompareByAssignmentName(AbstractPendingLinkingCandidate<?> right)protected CandidateCompareResultcompareByBucket(AbstractPendingLinkingCandidate<?> right)protected CandidateCompareResultcompareByName(AbstractPendingLinkingCandidate<?> right)protected CandidateCompareResultcompareByNameAndStaticFlag(AbstractPendingLinkingCandidate<?> right)protected CandidateCompareResultcompareTo(AbstractPendingLinkingCandidate<?> right, boolean invalid)ReturnsCandidateCompareResult#THISif this candidate is better,CandidateCompareResult#OTHERif the right candidate was better,CandidateCompareResult#AMBIGUOUSif both candidates are valid but ambiguous orCandidateCompareResult#EQUALLY_INVALIDif both candidates are ambiguous but erroneous.protected voidcomputeVarArgumentType(IFeatureCallArgumentSlot slot, TypeParameterSubstitutor<?> substitutor)protected ILinkingCandidatecreateAmbiguousLinkingCandidate(AbstractPendingLinkingCandidate<?> second)Produce a candidate that carries the information about ambiguous candidates.protected java.util.List<XExpression>createArgumentList(XExpression head, java.util.List<XExpression> tail)protected ILinkingCandidatecreateSuspiciousLinkingCandidate(AbstractPendingLinkingCandidate<?> chosenCandidate)Produce a candidate that carries the information about suspicious overload resolution where a member on 'this' wins over a member on 'it'.protected java.util.List<XExpression>getArguments()Returns the actual arguments of the expression.protected intgetConformanceFlags(int idx, boolean recompute)protected java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument>getDeclaratorParameterMapping()protected LightweightTypeReferencegetDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement feature)protected CandidateCompareResultgetExpectedTypeCompareResultOther(AbstractPendingLinkingCandidate<?> right)Returns the compare result for the declared parameter types if the given other candidate had won.XAbstractFeatureCallgetFeatureCall()Returns the feature call that is linked.protected java.lang.StringgetFeatureTypeName()Returns the name of the feature type, e.g.protected XExpressiongetFirstArgument()Returns the first argument if this is an extension.protected LightweightTypeReferencegetFirstArgumentType()protected XExpressiongetImplicitFirstArgument()protected LightweightTypeReferencegetImplicitFirstArgumentType()protected XExpressiongetImplicitReceiver()protected LightweightTypeReferencegetImplicitReceiverType()protected java.util.List<org.eclipse.xtext.common.types.JvmTypeReference>getPlainSyntacticTypeArguments()protected XExpressiongetReceiver()protected intgetReceiverConformanceFlags()protected LightweightTypeReferencegetReceiverType()protected LightweightTypeReferencegetSubstitutedExpectedType(int idx)Returns the substituted expected type for the argument atargumentIndex.protected java.util.List<XExpression>getSyntacticArguments()protected XExpressiongetSyntacticReceiver()protected XExpressiongetSyntacticReceiverIfPossibleArgument()Returns the syntactic receiver if it is an expression.protected LightweightTypeReferencegetSyntacticReceiverType()protected org.eclipse.xtext.diagnostics.SeveritygetUnhandledExceptionSeverity(org.eclipse.xtext.common.types.JvmExecutable executable)Obtain the currently applicable severity for uncaught exceptions.protected booleanhasReceiver()Returnstrueif the argument at index 0 will be considered as the receiver.protected voidinitializeMapping(org.eclipse.xtext.common.types.JvmTypeParameter typeParameter, java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument> result)protected booleanisAmbiguousExtensionProvider(AbstractPendingLinkingCandidate<?> right)protected booleanisAssignmentOrMemberFeatureCall()protected booleanisCompoundOperator()protected booleanisExplicitOperationCall()booleanisExtension()Returnstrueif the linked feature is contributed by an extension.protected booleanisFirstArgument(int argumentIndex)protected booleanisGetClass(org.eclipse.xtext.common.types.JvmIdentifiableElement feature)protected booleanisGetClassOnTypeLiteral()Returnstrueif the methodObject.getClass()is bound and the receiver is a type literal.protected booleanisImplicitlyStatic(XAssignment assignment)protected booleanisInvalidStaticSyntax()Returnstrueif a static member is accessed with an instance receiver, e.g.protected booleanisLambdaExpression(int argumentIdx)protected booleanisOperationCallSyntax()protected booleanisRawTypeContext()protected booleanisReassignFirstArgument(XAbstractFeatureCall featureCall)protected booleanisSimpleAssignment(XAssignment assignment)booleanisStatic()Returnstrueif the linked feature is static.protected booleanisStaticAccessSyntax()protected booleanisStaticWithDeclaringType()protected booleanisStaticWithDeclaringType(XAssignment assignment)protected booleanisSyntacticReceiverPossibleArgument()Returnstrueif the linked receiver could be a possible argument of this feature.booleanisTypeLiteral()Returnstrueif the feature call is linked as a type literal.protected booleanisTypeLiteral(XExpression expression)protected booleanisValidAssignmentName(IIdentifiableElementDescription description)protected voidpreApply()protected voidresolveAgainstActualType(LightweightTypeReference declaredType, LightweightTypeReference actualType, AbstractTypeComputationState state)protected voidresolveArgumentType(XExpression argument, LightweightTypeReference declaredType, ITypeComputationState argumentState)protected voidresolveKnownArgumentType(XExpression argument, LightweightTypeReference knownType, LightweightTypeReference declaredType, ITypeComputationState argumentState)booleanvalidate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)Validates this linking candidate and adds respective diagnostics to the given queue.protected booleanvalidateArity(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractPendingLinkingCandidate
compareByArity, compareByBoxing, compareByTypeArguments, compareDeclaredTypes, compareExpectedArgumentTypes, compareTo, getAllDescriptionsHash, getArgumentTypesAsString, getArityMismatch, getArityMismatch, getDefaultValidationFeature, getFeature, getFeatureParameterTypesAsString, getFeatureParameterTypesAsString, getFeatureTypeParametersAsString, getInvalidArgumentsValidationFeature, getPreferredCandidate, getSeverity, getSimpleFeatureName, getTypeArgumentConformanceFailures, getTypeArgumentsAsString, getTypeArityMismatch, getTypeParameterAsString, getTypeParameterMapping, isDefiniteEarlyExit, isPossibleFunctionType, isVarArgs, isVisible, resolveLinkingProxy, setAllDescriptionsHash, toString, validateTypeArgumentConformance, validateTypeArity, validateUnhandledExceptions, validateUnhandledExceptions, validateVisibility
-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractLinkingCandidate
accept, applyToComputationState, computeArgumentType, computeArgumentTypes, computeFixedArityArgumentType, createArgumentTypeSubstitutor, createLinkingTypeComputationState, createVarArgTypeComputationState, deferredBindTypeArgument, discardRefinementTypeIfReassigned, getActualType, getActualType, getDeclaredTypeParameters, getExpectedType, getExpression, getState, getSyntacticTypeArguments, getTypeArguments, initializeArgumentTypeComputation, initializeConstraintMapping, initializeTypeParameterMapping, initializeTypeParameterMapping, isBoundTypeArgumentSkipped, mustDiscardRefinement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.xtext.xbase.typesystem.computation.ILinkingCandidate
applyToComputationState, getExpression, getFeature, getPreferredCandidate, getTypeArguments
-
-
-
-
Constructor Detail
-
FeatureLinkingCandidate
public FeatureLinkingCandidate(XAbstractFeatureCall featureCall, IIdentifiableElementDescription description, ITypeExpectation expectation, ExpressionTypeComputationState state)
-
-
Method Detail
-
createAmbiguousLinkingCandidate
protected ILinkingCandidate createAmbiguousLinkingCandidate(AbstractPendingLinkingCandidate<?> second)
Description copied from class:AbstractPendingLinkingCandidateProduce a candidate that carries the information about ambiguous candidates.- Specified by:
createAmbiguousLinkingCandidatein classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
createSuspiciousLinkingCandidate
protected ILinkingCandidate createSuspiciousLinkingCandidate(AbstractPendingLinkingCandidate<?> chosenCandidate)
Description copied from class:AbstractPendingLinkingCandidateProduce a candidate that carries the information about suspicious overload resolution where a member on 'this' wins over a member on 'it'.- Overrides:
createSuspiciousLinkingCandidatein classAbstractPendingLinkingCandidate<XAbstractFeatureCall>- Parameters:
chosenCandidate- the candidate that was picked.
-
isRawTypeContext
protected boolean isRawTypeContext()
- Overrides:
isRawTypeContextin classAbstractLinkingCandidate<XAbstractFeatureCall>
-
initializeMapping
protected void initializeMapping(org.eclipse.xtext.common.types.JvmTypeParameter typeParameter, java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument> result)- Overrides:
initializeMappingin classAbstractLinkingCandidate<XAbstractFeatureCall>
-
getArguments
protected java.util.List<XExpression> getArguments()
Returns the actual arguments of the expression. These do not include the receiver.- Specified by:
getArgumentsin classAbstractLinkingCandidate<XAbstractFeatureCall>
-
validate
public boolean validate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
Validates this linking candidate and adds respective diagnostics to the given queue. In addition to the checks that are inherited fromAbstractPendingLinkingCandidate.validate(IAcceptor), the candidate is validated according these criteria:syntax for static feature calls,static context for static members,- field accessed as a method, e.g. with parentheses,
- usage of
thisorsuperin an invalid context, - direct invocation of an abstract method,
- attempt to enclose a non-final local variable in a lambda expression,
- reference to a private feature with a subclass instance,
errorprone invocation of getClass().
- Specified by:
validatein interfaceIApplicableCandidate- Overrides:
validatein classAbstractPendingLinkingCandidate<XAbstractFeatureCall>- Returns:
trueif further validation should be performed.
-
validateArity
protected boolean validateArity(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
- Overrides:
validateArityin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
isReassignFirstArgument
protected boolean isReassignFirstArgument(XAbstractFeatureCall featureCall)
-
isInvalidStaticSyntax
protected boolean isInvalidStaticSyntax()
Returnstrueif a static member is accessed with an instance receiver, e.g.myLocalVariable.STATIC_METHOD(..)ormyLocalVariable.STATIC_FIELD = null.
-
isStaticWithDeclaringType
protected boolean isStaticWithDeclaringType()
-
isStaticWithDeclaringType
protected boolean isStaticWithDeclaringType(XAssignment assignment)
-
isImplicitlyStatic
protected boolean isImplicitlyStatic(XAssignment assignment)
-
isTypeLiteral
protected boolean isTypeLiteral(XExpression expression)
-
isOperationCallSyntax
protected boolean isOperationCallSyntax()
-
getFeatureTypeName
protected java.lang.String getFeatureTypeName()
Description copied from class:AbstractPendingLinkingCandidateReturns the name of the feature type, e.g. a feature of typeJvmOperationmay returnmethod, aXVariableDeclarationmay identify itself aslocal variable.- Specified by:
getFeatureTypeNamein classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
isStaticAccessSyntax
protected boolean isStaticAccessSyntax()
-
isAssignmentOrMemberFeatureCall
protected boolean isAssignmentOrMemberFeatureCall()
-
isSimpleAssignment
protected boolean isSimpleAssignment(XAssignment assignment)
-
createArgumentList
protected java.util.List<XExpression> createArgumentList(XExpression head, java.util.List<XExpression> tail)
-
getSyntacticArguments
protected java.util.List<XExpression> getSyntacticArguments()
- Overrides:
getSyntacticArgumentsin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
isExtension
public boolean isExtension()
Description copied from interface:IFeatureLinkingCandidateReturnstrueif the linked feature is contributed by an extension.- Specified by:
isExtensionin interfaceIFeatureLinkingCandidate- Overrides:
isExtensionin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>- Returns:
- whether the feature is extension.
-
hasReceiver
protected boolean hasReceiver()
Description copied from class:AbstractLinkingCandidateReturnstrueif the argument at index 0 will be considered as the receiver.- Overrides:
hasReceiverin classAbstractLinkingCandidate<XAbstractFeatureCall>
-
isStatic
public boolean isStatic()
Description copied from interface:IFeatureLinkingCandidateReturnstrueif the linked feature is static.- Specified by:
isStaticin interfaceIFeatureLinkingCandidate- Returns:
- whether the feature is static.
-
isSyntacticReceiverPossibleArgument
protected boolean isSyntacticReceiverPossibleArgument()
Returnstrueif the linked receiver could be a possible argument of this feature. Basically it's false if this feature is an error feature, a local variable or a if the receiver is a type literal that's treated as a static qualifier rather than a literal expression.
-
isTypeLiteral
public boolean isTypeLiteral()
Description copied from interface:IFeatureLinkingCandidateReturnstrueif the feature call is linked as a type literal.- Specified by:
isTypeLiteralin interfaceIFeatureLinkingCandidate- Overrides:
isTypeLiteralin classAbstractLinkingCandidate<XAbstractFeatureCall>- Returns:
- whether the feature call is a type literal rather than a real feature call.
-
getExpectedTypeCompareResultOther
protected CandidateCompareResult getExpectedTypeCompareResultOther(AbstractPendingLinkingCandidate<?> right)
Description copied from class:AbstractPendingLinkingCandidateReturns the compare result for the declared parameter types if the given other candidate had won.- Overrides:
getExpectedTypeCompareResultOtherin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>- Parameters:
right- the winner of the comparison.
-
getConformanceFlags
protected int getConformanceFlags(int idx, boolean recompute)- Overrides:
getConformanceFlagsin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
isLambdaExpression
protected boolean isLambdaExpression(int argumentIdx)
- Overrides:
isLambdaExpressionin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
getSubstitutedExpectedType
protected LightweightTypeReference getSubstitutedExpectedType(int idx)
Description copied from class:AbstractLinkingCandidateReturns the substituted expected type for the argument atargumentIndex. If the expected type is an unbound type parameter, a reference to the type parameter itself is returned.- Overrides:
getSubstitutedExpectedTypein classAbstractLinkingCandidate<XAbstractFeatureCall>
-
isExplicitOperationCall
protected boolean isExplicitOperationCall()
-
compareByName
protected CandidateCompareResult compareByName(AbstractPendingLinkingCandidate<?> right)
- Overrides:
compareByNamein classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
compareByArgumentTypes
protected CandidateCompareResult compareByArgumentTypes(AbstractPendingLinkingCandidate<?> right)
- Overrides:
compareByArgumentTypesin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
compareByArgumentTypes
protected CandidateCompareResult compareByArgumentTypes(AbstractPendingLinkingCandidate<?> right, boolean recompute)
- Overrides:
compareByArgumentTypesin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
compareByNameAndStaticFlag
protected CandidateCompareResult compareByNameAndStaticFlag(AbstractPendingLinkingCandidate<?> right)
-
isCompoundOperator
protected boolean isCompoundOperator()
-
compareByBucket
protected CandidateCompareResult compareByBucket(AbstractPendingLinkingCandidate<?> right)
- Overrides:
compareByBucketin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
isAmbiguousExtensionProvider
protected boolean isAmbiguousExtensionProvider(AbstractPendingLinkingCandidate<?> right)
-
compareTo
protected CandidateCompareResult compareTo(AbstractPendingLinkingCandidate<?> right, boolean invalid)
Description copied from class:AbstractPendingLinkingCandidateReturnsCandidateCompareResult#THISif this candidate is better,CandidateCompareResult#OTHERif the right candidate was better,CandidateCompareResult#AMBIGUOUSif both candidates are valid but ambiguous orCandidateCompareResult#EQUALLY_INVALIDif both candidates are ambiguous but erroneous. The invalid flag indicates if we already know that both candidates are equally invalid.- Overrides:
compareToin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
compareByAssignmentName
protected CandidateCompareResult compareByAssignmentName(AbstractPendingLinkingCandidate<?> right)
-
isValidAssignmentName
protected boolean isValidAssignmentName(IIdentifiableElementDescription description)
-
compareByArityWith
protected CandidateCompareResult compareByArityWith(AbstractPendingLinkingCandidate<?> right)
- Overrides:
compareByArityWithin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>
-
compareByArgumentTypesFlags
protected CandidateCompareResult compareByArgumentTypesFlags(AbstractPendingLinkingCandidate<?> right, int leftIdx, int rightIdx, int leftConformance, int rightConformance)
Description copied from class:AbstractPendingLinkingCandidateCompare this linking candidate with the givenothercandidate atleftIdxandrightIdxrespectively. ReturnsCandidateCompareResult#THISif this candidate is better,CandidateCompareResult#OTHERif the right candidate was better,CandidateCompareResult#AMBIGUOUSif both candidates are valid but ambiguous orCandidateCompareResult#EQUALLY_INVALIDif both candidates are ambiguous but erroneous.- Overrides:
compareByArgumentTypesFlagsin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>- Parameters:
right- the other candidateleftIdx- the semantic argument index on this candidaterightIdx- the semantic argument index on the other candidateleftConformance- the computed conformance in this linking candidaterightConformance- the computed conformance if the other candidate was chosen
-
isFirstArgument
protected boolean isFirstArgument(int argumentIndex)
-
compareByArgumentTypes
protected CandidateCompareResult compareByArgumentTypes(AbstractPendingLinkingCandidate<?> right, int leftBoxing, int rightBoxing, int leftDemand, int rightDemand)
Description copied from class:AbstractPendingLinkingCandidateCompare this linking candidate with the givenothercandidate atargumentIndexReturnsCandidateCompareResult#THISif this candidate is better,CandidateCompareResult#OTHERif the right candidate was better,CandidateCompareResult#AMBIGUOUSif both candidates are valid but ambiguous orCandidateCompareResult#EQUALLY_INVALIDif both candidates are ambiguous but erroneous.- Overrides:
compareByArgumentTypesin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>- Parameters:
right- the other candidate (the rhs of the comparison)leftBoxing- the number of required boxing conversions if this candidate was chosenrightBoxing- the number of required boxing conversions if the other candidate was chosenleftDemand- the number of required demand conversions if this candidate was chosenrightDemand- the number of required demand conversions if the other candidate was chosen
-
compareByArgumentTypes
protected CandidateCompareResult compareByArgumentTypes(FeatureLinkingCandidate right, int leftBoxing, int rightBoxing)
-
compareByArgumentTypesAndStaticFlag
protected CandidateCompareResult compareByArgumentTypesAndStaticFlag(FeatureLinkingCandidate right, int leftBoxing, int rightBoxing)
-
preApply
protected void preApply()
- Overrides:
preApplyin classAbstractLinkingCandidate<XAbstractFeatureCall>
-
applyImplicitReceiver
protected void applyImplicitReceiver()
-
resolveAgainstActualType
protected void resolveAgainstActualType(LightweightTypeReference declaredType, LightweightTypeReference actualType, AbstractTypeComputationState state)
- Overrides:
resolveAgainstActualTypein classAbstractLinkingCandidate<XAbstractFeatureCall>
-
getFeatureCall
public XAbstractFeatureCall getFeatureCall()
Description copied from interface:IFeatureLinkingCandidateReturns the feature call that is linked.- Specified by:
getFeatureCallin interfaceIFeatureLinkingCandidate- Returns:
- the feature call.
-
getPlainSyntacticTypeArguments
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeReference> getPlainSyntacticTypeArguments()
- Specified by:
getPlainSyntacticTypeArgumentsin classAbstractLinkingCandidate<XAbstractFeatureCall>
-
resolveArgumentType
protected void resolveArgumentType(XExpression argument, LightweightTypeReference declaredType, ITypeComputationState argumentState)
- Overrides:
resolveArgumentTypein classAbstractLinkingCandidate<XAbstractFeatureCall>- Parameters:
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.
-
resolveKnownArgumentType
protected void resolveKnownArgumentType(XExpression argument, LightweightTypeReference knownType, LightweightTypeReference declaredType, ITypeComputationState argumentState)
-
computeVarArgumentType
protected void computeVarArgumentType(IFeatureCallArgumentSlot slot, TypeParameterSubstitutor<?> substitutor)
- Overrides:
computeVarArgumentTypein classAbstractLinkingCandidate<XAbstractFeatureCall>
-
getDeclaratorParameterMapping
protected java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument> getDeclaratorParameterMapping()
- Overrides:
getDeclaratorParameterMappingin classAbstractLinkingCandidate<XAbstractFeatureCall>
-
getReceiver
protected XExpression getReceiver()
-
getReceiverType
protected LightweightTypeReference getReceiverType()
-
getReceiverConformanceFlags
protected int getReceiverConformanceFlags()
-
getFirstArgument
protected XExpression getFirstArgument()
Returns the first argument if this is an extension. This may be the implicit first argument or the syntactic receiver of the feature call.
-
getFirstArgumentType
protected LightweightTypeReference getFirstArgumentType()
-
getImplicitReceiver
protected XExpression getImplicitReceiver()
-
getImplicitReceiverType
protected LightweightTypeReference getImplicitReceiverType()
-
getSyntacticReceiver
protected XExpression getSyntacticReceiver()
-
getSyntacticReceiverIfPossibleArgument
protected XExpression getSyntacticReceiverIfPossibleArgument()
Returns the syntactic receiver if it is an expression. Type literals are not considered to be expressions thusnullis returned as the syntactic receiver of the expressionvalueOf(..)injava.lang.String.valueOf(..).
-
getSyntacticReceiverType
protected LightweightTypeReference getSyntacticReceiverType()
-
getImplicitFirstArgument
protected XExpression getImplicitFirstArgument()
-
getImplicitFirstArgumentType
protected LightweightTypeReference getImplicitFirstArgumentType()
-
getDeclaredType
protected LightweightTypeReference getDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement feature)
- Overrides:
getDeclaredTypein classAbstractLinkingCandidate<XAbstractFeatureCall>
-
isGetClassOnTypeLiteral
protected boolean isGetClassOnTypeLiteral()
Returnstrueif the methodObject.getClass()is bound and the receiver is a type literal. This may indicate a bug.
-
isGetClass
protected boolean isGetClass(org.eclipse.xtext.common.types.JvmIdentifiableElement feature)
-
applyToModel
public void applyToModel(IResolvedTypes resolvedTypes)
Description copied from interface:ILinkingCandidateInjects the resolved feature into the model with the same semantics as the implicitresolveof EMF. This implies that the linked feature call may still point to a proxy afterwards.- Specified by:
applyToModelin interfaceIApplicableCandidate- Specified by:
applyToModelin interfaceILinkingCandidate
-
getUnhandledExceptionSeverity
protected org.eclipse.xtext.diagnostics.Severity getUnhandledExceptionSeverity(org.eclipse.xtext.common.types.JvmExecutable executable)
Description copied from class:AbstractPendingLinkingCandidateObtain the currently applicable severity for uncaught exceptions. Sneaky throw techniques cannot be applied to delegating constructor calls. Therefore it's possible to raise the severity for them by checking the linked executable.- Overrides:
getUnhandledExceptionSeverityin classAbstractPendingLinkingCandidate<XAbstractFeatureCall>- Parameters:
executable- the executable that declares the exception.
-
-