Class ConstructorLinkingCandidate
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractLinkingCandidate<Expression>
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractPendingLinkingCandidate<XConstructorCall>
-
- org.eclipse.xtext.xbase.typesystem.internal.ConstructorLinkingCandidate
-
- All Implemented Interfaces:
IApplicableCandidate
,IConstructorLinkingCandidate
,ILinkingCandidate
public class ConstructorLinkingCandidate extends AbstractPendingLinkingCandidate<XConstructorCall> implements IConstructorLinkingCandidate
-
-
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
-
-
Constructor Summary
Constructors Constructor Description ConstructorLinkingCandidate(XConstructorCall constructorCall, IIdentifiableElementDescription description, ITypeExpectation expectation, ExpressionTypeComputationState state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyToModel(IResolvedTypes resolvedTypes)
Injects the resolved feature into the model with the same semantics as the implicitresolve
of EMF.protected ILinkingCandidate
createAmbiguousLinkingCandidate(AbstractPendingLinkingCandidate<?> second)
Produce a candidate that carries the information about ambiguous candidates.protected LightweightTypeReference
deferredBindTypeArgument(ITypeExpectation expectation, LightweightTypeReference type)
protected java.util.List<XExpression>
getArguments()
protected int
getConformanceFlags(int idx, boolean recompute)
org.eclipse.xtext.common.types.JvmConstructor
getConstructor()
XConstructorCall
getConstructorCall()
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter>
getDeclaredTypeParameters()
protected org.eclipse.emf.ecore.EReference
getDefaultValidationFeature()
protected java.lang.String
getFeatureTypeName()
Returns the name of the feature type, e.g.protected org.eclipse.emf.ecore.EReference
getInvalidArgumentsValidationFeature()
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeReference>
getPlainSyntacticTypeArguments()
protected java.lang.String
getSimpleFeatureName()
boolean
isAnonymousClassConstructorCall()
protected boolean
isBoundTypeArgumentSkipped(org.eclipse.xtext.common.types.JvmTypeParameter type, java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument> mapping, ITypeReferenceOwner owner)
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.-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractPendingLinkingCandidate
compareByArgumentTypes, compareByArgumentTypes, compareByArgumentTypes, compareByArgumentTypesFlags, compareByArity, compareByArityWith, compareByBoxing, compareByBucket, compareByName, compareByTypeArguments, compareDeclaredTypes, compareExpectedArgumentTypes, compareTo, compareTo, createSuspiciousLinkingCandidate, getArgumentTypesAsString, getArityMismatch, getArityMismatch, getExpectedTypeCompareResultOther, getFeature, getFeatureParameterTypesAsString, getFeatureParameterTypesAsString, getFeatureTypeParametersAsString, getPreferredCandidate, getSeverity, getSyntacticArguments, getTypeArgumentConformanceFailures, getTypeArgumentsAsString, getTypeArityMismatch, getTypeParameterAsString, getTypeParameterMapping, getUnhandledExceptionSeverity, isDefiniteEarlyExit, isExtension, isLambdaExpression, isPossibleFunctionType, isVarArgs, isVisible, resolveLinkingProxy, toString, validateArity, validateTypeArgumentConformance, validateTypeArity, validateUnhandledExceptions, validateUnhandledExceptions, validateVisibility
-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractLinkingCandidate
accept, applyToComputationState, computeArgumentType, computeArgumentTypes, computeFixedArityArgumentType, computeVarArgumentType, createArgumentTypeSubstitutor, createLinkingTypeComputationState, createVarArgTypeComputationState, discardRefinementTypeIfReassigned, getActualType, getActualType, getDeclaratorParameterMapping, getDeclaredType, getExpectedType, getExpression, getState, getSubstitutedExpectedType, getSyntacticTypeArguments, getTypeArguments, hasReceiver, initializeArgumentTypeComputation, initializeConstraintMapping, initializeMapping, initializeTypeParameterMapping, initializeTypeParameterMapping, isRawTypeContext, isTypeLiteral, mustDiscardRefinement, preApply, resolveAgainstActualType, resolveArgumentType
-
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.IConstructorLinkingCandidate
getTypeArguments
-
Methods inherited from interface org.eclipse.xtext.xbase.typesystem.computation.ILinkingCandidate
applyToComputationState, getExpression, getFeature, getPreferredCandidate
-
-
-
-
Constructor Detail
-
ConstructorLinkingCandidate
public ConstructorLinkingCandidate(XConstructorCall constructorCall, IIdentifiableElementDescription description, ITypeExpectation expectation, ExpressionTypeComputationState state)
-
-
Method Detail
-
getConstructor
public org.eclipse.xtext.common.types.JvmConstructor getConstructor()
- Specified by:
getConstructor
in interfaceIConstructorLinkingCandidate
-
getConstructorCall
public XConstructorCall getConstructorCall()
- Specified by:
getConstructorCall
in interfaceIConstructorLinkingCandidate
-
createAmbiguousLinkingCandidate
protected ILinkingCandidate createAmbiguousLinkingCandidate(AbstractPendingLinkingCandidate<?> second)
Description copied from class:AbstractPendingLinkingCandidate
Produce a candidate that carries the information about ambiguous candidates.- Specified by:
createAmbiguousLinkingCandidate
in classAbstractPendingLinkingCandidate<XConstructorCall>
-
getArguments
protected java.util.List<XExpression> getArguments()
- Specified by:
getArguments
in classAbstractLinkingCandidate<XConstructorCall>
-
getConformanceFlags
protected int getConformanceFlags(int idx, boolean recompute)
- Overrides:
getConformanceFlags
in classAbstractPendingLinkingCandidate<XConstructorCall>
-
deferredBindTypeArgument
protected LightweightTypeReference deferredBindTypeArgument(ITypeExpectation expectation, LightweightTypeReference type)
- Overrides:
deferredBindTypeArgument
in classAbstractLinkingCandidate<XConstructorCall>
-
validate
public boolean validate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
Description copied from class:AbstractPendingLinkingCandidate
Validates this linking candidate and adds respective diagnostics to the given queue. This checks the following criteria:- Specified by:
validate
in interfaceIApplicableCandidate
- Overrides:
validate
in classAbstractPendingLinkingCandidate<XConstructorCall>
- Returns:
true
if further validation should be performed.
-
isBoundTypeArgumentSkipped
protected boolean isBoundTypeArgumentSkipped(org.eclipse.xtext.common.types.JvmTypeParameter type, java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument> mapping, ITypeReferenceOwner owner)
- Overrides:
isBoundTypeArgumentSkipped
in classAbstractLinkingCandidate<XConstructorCall>
-
getDefaultValidationFeature
protected org.eclipse.emf.ecore.EReference getDefaultValidationFeature()
- Overrides:
getDefaultValidationFeature
in classAbstractPendingLinkingCandidate<XConstructorCall>
-
getInvalidArgumentsValidationFeature
protected org.eclipse.emf.ecore.EReference getInvalidArgumentsValidationFeature()
- Overrides:
getInvalidArgumentsValidationFeature
in classAbstractPendingLinkingCandidate<XConstructorCall>
-
getFeatureTypeName
protected java.lang.String getFeatureTypeName()
Description copied from class:AbstractPendingLinkingCandidate
Returns the name of the feature type, e.g. a feature of typeJvmOperation
may returnmethod
, aXVariableDeclaration
may identify itself aslocal variable
.- Specified by:
getFeatureTypeName
in classAbstractPendingLinkingCandidate<XConstructorCall>
-
getSimpleFeatureName
protected java.lang.String getSimpleFeatureName()
- Overrides:
getSimpleFeatureName
in classAbstractPendingLinkingCandidate<XConstructorCall>
-
isAnonymousClassConstructorCall
public boolean isAnonymousClassConstructorCall()
- Specified by:
isAnonymousClassConstructorCall
in interfaceIConstructorLinkingCandidate
-
getPlainSyntacticTypeArguments
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeReference> getPlainSyntacticTypeArguments()
- Specified by:
getPlainSyntacticTypeArguments
in classAbstractLinkingCandidate<XConstructorCall>
-
applyToModel
public void applyToModel(IResolvedTypes resolvedTypes)
Description copied from interface:ILinkingCandidate
Injects the resolved feature into the model with the same semantics as the implicitresolve
of EMF. This implies that the linked feature call may still point to a proxy afterwards.- Specified by:
applyToModel
in interfaceIApplicableCandidate
- Specified by:
applyToModel
in interfaceILinkingCandidate
-
getDeclaredTypeParameters
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> getDeclaredTypeParameters()
- Overrides:
getDeclaredTypeParameters
in classAbstractLinkingCandidate<XConstructorCall>
-
-