Class TypeInsteadOfConstructorLinkingCandidate
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractUnresolvableReference
-
- org.eclipse.xtext.xbase.typesystem.internal.TypeInsteadOfConstructorLinkingCandidate
-
- All Implemented Interfaces:
IApplicableCandidate,IConstructorLinkingCandidate,ILinkingCandidate
public class TypeInsteadOfConstructorLinkingCandidate extends AbstractUnresolvableReference implements IConstructorLinkingCandidate
-
-
Constructor Summary
Constructors Constructor Description TypeInsteadOfConstructorLinkingCandidate(XConstructorCall constructorCall, IIdentifiableElementDescription description, 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 voidapplyType()protected java.util.List<XExpression>getArguments()org.eclipse.xtext.common.types.JvmConstructorgetConstructor()XConstructorCallgetConstructorCall()org.eclipse.xtext.common.types.JvmIdentifiableElementgetFeature()The currently considered feature (if any).java.util.List<LightweightTypeReference>getSyntacticTypeArguments()java.util.List<LightweightTypeReference>getTypeArguments()The resolved type arguments.booleanisAnonymousClassConstructorCall()booleanvalidate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)Produce diagnostics for this condidate.-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractUnresolvableReference
applyToComputationState, computeArgumentTypes, getContext, getExpression, getPreferredCandidate, getResolvedTypes, getState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.xtext.xbase.typesystem.computation.ILinkingCandidate
applyToComputationState, getExpression, getPreferredCandidate
-
-
-
-
Constructor Detail
-
TypeInsteadOfConstructorLinkingCandidate
public TypeInsteadOfConstructorLinkingCandidate(XConstructorCall constructorCall, IIdentifiableElementDescription description, ExpressionTypeComputationState state)
-
-
Method Detail
-
getConstructor
public org.eclipse.xtext.common.types.JvmConstructor getConstructor()
- Specified by:
getConstructorin interfaceIConstructorLinkingCandidate
-
isAnonymousClassConstructorCall
public boolean isAnonymousClassConstructorCall()
- Specified by:
isAnonymousClassConstructorCallin interfaceIConstructorLinkingCandidate
-
applyType
protected void applyType()
- Overrides:
applyTypein classAbstractUnresolvableReference
-
getConstructorCall
public XConstructorCall getConstructorCall()
- Specified by:
getConstructorCallin interfaceIConstructorLinkingCandidate
-
getArguments
protected java.util.List<XExpression> getArguments()
- Specified by:
getArgumentsin classAbstractUnresolvableReference
-
getFeature
public org.eclipse.xtext.common.types.JvmIdentifiableElement getFeature()
Description copied from interface:ILinkingCandidateThe currently considered feature (if any). Otherwisenull.- Specified by:
getFeaturein interfaceILinkingCandidate- Overrides:
getFeaturein classAbstractUnresolvableReference
-
validate
public boolean validate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
Description copied from interface:IApplicableCandidateProduce diagnostics for this condidate. It is not the responsibility of this candidate to propagate the acceptor to its children.- Specified by:
validatein interfaceIApplicableCandidate- Overrides:
validatein classAbstractUnresolvableReference- Returns:
trueif further validation should be performed.
-
getTypeArguments
public java.util.List<LightweightTypeReference> getTypeArguments()
Description copied from interface:IConstructorLinkingCandidateThe resolved type arguments. If the constructor itself defines type parameters, their resolved representation is prepended to the list of type arguments. Consider the following type:class C<T, V> { publicAn invocation of the constructorC(P p) {} }
Cwill return three type arguments, the bound values of forP,TandV.- Specified by:
getTypeArgumentsin interfaceIConstructorLinkingCandidate- Specified by:
getTypeArgumentsin interfaceILinkingCandidate
-
getSyntacticTypeArguments
public java.util.List<LightweightTypeReference> getSyntacticTypeArguments()
-
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
-
-