public class ResolvedTypeLiteral extends AbstractResolvedReference<XAbstractFeatureCall> implements ITypeLiteralLinkingCandidate
AbstractLinkingCandidate.ArgumentTypeComputationState, AbstractLinkingCandidate.ObservableTypeExpectation
resolvedElement
arguments, typeArguments
Modifier | Constructor and Description |
---|---|
protected |
ResolvedTypeLiteral(XAbstractFeatureCall featureCall,
JvmIdentifiableElement resolvedElement,
ITypeExpectation expectation,
ExpressionTypeComputationState state) |
Modifier and Type | Method and Description |
---|---|
void |
applyToComputationState()
Apply this candidate to the current computation state model.
|
protected java.util.List<XExpression> |
getArguments() |
protected LightweightTypeReference |
getDeclaredType(JvmIdentifiableElement feature) |
protected java.util.List<JvmTypeParameter> |
getDeclaredTypeParameters() |
XAbstractFeatureCall |
getFeatureCall()
Returns the feature call that is linked.
|
protected java.util.List<JvmTypeReference> |
getPlainSyntacticTypeArguments() |
ILinkingCandidate |
getPreferredCandidate(ILinkingCandidate other)
Produces the best candidate for the current two candidates.
|
JvmType |
getType()
Returns the type that shall be resolved as a literal.
|
java.util.List<LightweightTypeReference> |
getTypeArguments()
The resolved type arguments.
|
boolean |
isExtension()
Returns
true if the the linked feature is contributed
by an extension. |
boolean |
isPackageFragment() |
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() |
applyToModel, getFeature, getTypeParameterMapping, toString, validate
accept, computeArgumentType, computeArgumentTypes, computeFixedArityArgumentType, computeVarArgumentType, createArgumentTypeSubstitutor, createLinkingTypeComputationState, createVarArgTypeComputationState, deferredBindTypeArgument, discardRefinementTypeIfReassigned, getActualType, getActualType, getDeclaratorParameterMapping, getExpectedType, getExpression, getState, getSubstitutedExpectedType, getSyntacticTypeArguments, hasReceiver, initializeArgumentTypeComputation, initializeConstraintMapping, initializeMapping, initializeTypeParameterMapping, initializeTypeParameterMapping, isBoundTypeArgumentSkipped, isRawTypeContext, mustDiscardRefinement, resolveAgainstActualType, resolveArgumentType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
applyToModel, getExpression, getFeature
validate
protected ResolvedTypeLiteral(XAbstractFeatureCall featureCall, JvmIdentifiableElement resolvedElement, ITypeExpectation expectation, ExpressionTypeComputationState state)
public XAbstractFeatureCall getFeatureCall()
IFeatureLinkingCandidate
getFeatureCall
in interface IFeatureLinkingCandidate
public boolean isStatic()
IFeatureLinkingCandidate
true
if the the linked feature is static.isStatic
in interface IFeatureLinkingCandidate
isStatic
in interface ITypeLiteralLinkingCandidate
false
.public JvmType getType()
ITypeLiteralLinkingCandidate
getType
in interface ITypeLiteralLinkingCandidate
public boolean isExtension()
IFeatureLinkingCandidate
true
if the the linked feature is contributed
by an extension.isExtension
in interface IFeatureLinkingCandidate
isExtension
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 boolean isPackageFragment()
protected java.util.List<XExpression> getArguments()
getArguments
in class AbstractLinkingCandidate<XAbstractFeatureCall>
public java.util.List<LightweightTypeReference> getTypeArguments()
ILinkingCandidate
getTypeArguments
in interface ILinkingCandidate
getTypeArguments
in interface ITypeLiteralLinkingCandidate
getTypeArguments
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected java.util.List<JvmTypeReference> getPlainSyntacticTypeArguments()
getPlainSyntacticTypeArguments
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected java.util.List<JvmTypeParameter> getDeclaredTypeParameters()
getDeclaredTypeParameters
in class AbstractLinkingCandidate<XAbstractFeatureCall>
public ILinkingCandidate getPreferredCandidate(ILinkingCandidate other)
ILinkingCandidate
this
and other
) are ambiguous
so no prefered candidate can be chosen. In that case, a new linking candidate
may be produced that carries this information and will use that on ILinkingCandidate.applyToComputationState()
,
ILinkingCandidate.applyToModel(IResolvedTypes)
, and IApplicableCandidate.validate(IAcceptor)
.getPreferredCandidate
in interface ILinkingCandidate
public void applyToComputationState()
ILinkingCandidate
applyToComputationState
in interface ILinkingCandidate
applyToComputationState
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected void preApply()
preApply
in class AbstractLinkingCandidate<XAbstractFeatureCall>
protected LightweightTypeReference getDeclaredType(JvmIdentifiableElement feature)
getDeclaredType
in class AbstractLinkingCandidate<XAbstractFeatureCall>