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 voidapplyToModel(IResolvedTypes resolvedTypes)Injects the resolved feature into the model with the same semantics as the implicitresolveof EMF.protected ILinkingCandidatecreateAmbiguousLinkingCandidate(AbstractPendingLinkingCandidate<?> second)Produce a candidate that carries the information about ambiguous candidates.protected LightweightTypeReferencedeferredBindTypeArgument(ITypeExpectation expectation, LightweightTypeReference type)protected java.util.List<XExpression>getArguments()protected intgetConformanceFlags(int idx, boolean recompute)org.eclipse.xtext.common.types.JvmConstructorgetConstructor()XConstructorCallgetConstructorCall()protected java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter>getDeclaredTypeParameters()protected org.eclipse.emf.ecore.EReferencegetDefaultValidationFeature()protected java.lang.StringgetFeatureTypeName()Returns the name of the feature type, e.g.protected org.eclipse.emf.ecore.EReferencegetInvalidArgumentsValidationFeature()protected java.util.List<org.eclipse.xtext.common.types.JvmTypeReference>getPlainSyntacticTypeArguments()protected java.lang.StringgetSimpleFeatureName()booleanisAnonymousClassConstructorCall()protected booleanisBoundTypeArgumentSkipped(org.eclipse.xtext.common.types.JvmTypeParameter type, java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument> mapping, ITypeReferenceOwner owner)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.-
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, getAllDescriptionsHash, getArgumentTypesAsString, getArityMismatch, getArityMismatch, getExpectedTypeCompareResultOther, getFeature, getFeatureParameterTypesAsString, getFeatureParameterTypesAsString, getFeatureTypeParametersAsString, getPreferredCandidate, getSeverity, getSyntacticArguments, getTypeArgumentConformanceFailures, getTypeArgumentsAsString, getTypeArityMismatch, getTypeParameterAsString, getTypeParameterMapping, getUnhandledExceptionSeverity, isDefiniteEarlyExit, isExtension, isLambdaExpression, isPossibleFunctionType, isVarArgs, isVisible, resolveLinkingProxy, setAllDescriptionsHash, 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:
getConstructorin interfaceIConstructorLinkingCandidate
-
getConstructorCall
public XConstructorCall getConstructorCall()
- Specified by:
getConstructorCallin interfaceIConstructorLinkingCandidate
-
createAmbiguousLinkingCandidate
protected ILinkingCandidate createAmbiguousLinkingCandidate(AbstractPendingLinkingCandidate<?> second)
Description copied from class:AbstractPendingLinkingCandidateProduce a candidate that carries the information about ambiguous candidates.- Specified by:
createAmbiguousLinkingCandidatein classAbstractPendingLinkingCandidate<XConstructorCall>
-
getArguments
protected java.util.List<XExpression> getArguments()
- Specified by:
getArgumentsin classAbstractLinkingCandidate<XConstructorCall>
-
getConformanceFlags
protected int getConformanceFlags(int idx, boolean recompute)- Overrides:
getConformanceFlagsin classAbstractPendingLinkingCandidate<XConstructorCall>
-
deferredBindTypeArgument
protected LightweightTypeReference deferredBindTypeArgument(ITypeExpectation expectation, LightweightTypeReference type)
- Overrides:
deferredBindTypeArgumentin classAbstractLinkingCandidate<XConstructorCall>
-
validate
public boolean validate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
Description copied from class:AbstractPendingLinkingCandidateValidates this linking candidate and adds respective diagnostics to the given queue. This checks the following criteria:- Specified by:
validatein interfaceIApplicableCandidate- Overrides:
validatein classAbstractPendingLinkingCandidate<XConstructorCall>- Returns:
trueif 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:
isBoundTypeArgumentSkippedin classAbstractLinkingCandidate<XConstructorCall>
-
getDefaultValidationFeature
protected org.eclipse.emf.ecore.EReference getDefaultValidationFeature()
- Overrides:
getDefaultValidationFeaturein classAbstractPendingLinkingCandidate<XConstructorCall>
-
getInvalidArgumentsValidationFeature
protected org.eclipse.emf.ecore.EReference getInvalidArgumentsValidationFeature()
- Overrides:
getInvalidArgumentsValidationFeaturein classAbstractPendingLinkingCandidate<XConstructorCall>
-
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<XConstructorCall>
-
getSimpleFeatureName
protected java.lang.String getSimpleFeatureName()
- Overrides:
getSimpleFeatureNamein classAbstractPendingLinkingCandidate<XConstructorCall>
-
isAnonymousClassConstructorCall
public boolean isAnonymousClassConstructorCall()
- Specified by:
isAnonymousClassConstructorCallin interfaceIConstructorLinkingCandidate
-
getPlainSyntacticTypeArguments
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeReference> getPlainSyntacticTypeArguments()
- Specified by:
getPlainSyntacticTypeArgumentsin classAbstractLinkingCandidate<XConstructorCall>
-
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
-
getDeclaredTypeParameters
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> getDeclaredTypeParameters()
- Overrides:
getDeclaredTypeParametersin classAbstractLinkingCandidate<XConstructorCall>
-
-