Interface ITypeExpectation
-
- All Known Implementing Classes:
AbstractLinkingCandidate.ObservableTypeExpectation,AbstractReturnAwareTypeExpectation,AbstractRootTypeExpectation,AbstractTypeExpectation,NoExpectation,RootExpressionTypeComputationState.PendingRootExpectation,RootNoExpectation,RootTypeExpectation,TypeExpectation
public interface ITypeExpectation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidacceptActualType(LightweightTypeReference type, int flags)voidacceptActualType(LightweightTypeReference type, java.util.EnumSet<ConformanceHint> hints)voidacceptActualType(LightweightTypeReference type, ConformanceHint... hints)ITypeExpectationcopyInto(ITypeReferenceOwner referenceOwner)UnboundTypeReferencecreateUnboundTypeReference(XExpression expression, org.eclipse.xtext.common.types.JvmTypeParameter typeParameter)Create a new, managedUnboundTypeReferencefor the given type parameter which was first encountered for the given expression.LightweightTypeReferencegetExpectedType()Returns the expected type.ITypeReferenceOwnergetReferenceOwner()booleanisNoTypeExpectation()Returnstrueif anything is allowed and no constraints are expected.booleanisOwnedBy(ITypeReferenceOwner referenceOwner)booleanisVoidTypeAllowed()ReturnstrueifVoid.TYPEis a valid type.
-
-
-
Method Detail
-
acceptActualType
void acceptActualType(LightweightTypeReference type, ConformanceHint... hints)
-
acceptActualType
void acceptActualType(LightweightTypeReference type, java.util.EnumSet<ConformanceHint> hints)
-
acceptActualType
void acceptActualType(LightweightTypeReference type, int flags)
-
getReferenceOwner
ITypeReferenceOwner getReferenceOwner()
-
createUnboundTypeReference
UnboundTypeReference createUnboundTypeReference(XExpression expression, org.eclipse.xtext.common.types.JvmTypeParameter typeParameter)
Create a new, managedUnboundTypeReferencefor the given type parameter which was first encountered for the given expression.- Parameters:
expression- the expression that used / referenced the type parametertypeParameter- the type parameter
-
copyInto
ITypeExpectation copyInto(ITypeReferenceOwner referenceOwner)
-
isOwnedBy
boolean isOwnedBy(ITypeReferenceOwner referenceOwner)
-
getExpectedType
LightweightTypeReference getExpectedType()
Returns the expected type. The expected type may be not too concrete thusgetExpectedType()may returnnullor some sort of unresolved, specialized reference. Ifnullis returned, clients may want to checkisNoTypeExpectation()orisVoidTypeAllowed().- Returns:
- the expected type. This may be
null.
-
isNoTypeExpectation
boolean isNoTypeExpectation()
Returnstrueif anything is allowed and no constraints are expected.- Returns:
trueif anything is allowed and no constraints are expected.
-
isVoidTypeAllowed
boolean isVoidTypeAllowed()
ReturnstrueifVoid.TYPEis a valid type. It may be the only valid type or there may exist others.- Returns:
trueif primitivevoidis allowed.
-
-