public class TypeExpectation extends AbstractReturnAwareTypeExpectation
Constructor and Description |
---|
TypeExpectation(LightweightTypeReference reference,
AbstractTypeComputationState state,
boolean returnType) |
Modifier and Type | Method and Description |
---|---|
TypeExpectation |
copyInto(ITypeReferenceOwner referenceOwner) |
LightweightTypeReference |
getExpectedType()
Returns the expected type.
|
boolean |
isNoTypeExpectation()
Returns
true if anything is allowed and no constraints are expected. |
acceptActualType, isReturnType
acceptActualType, acceptActualType, createUnboundTypeReference, getReferenceOwner, getResolvedTypes, getState, isOwnedBy, isVoidTypeAllowed, toString
public TypeExpectation(LightweightTypeReference reference, AbstractTypeComputationState state, boolean returnType)
public boolean isNoTypeExpectation()
ITypeExpectation
true
if anything is allowed and no constraints are expected.true
if anything is allowed and no constraints are expected.public LightweightTypeReference getExpectedType()
ITypeExpectation
ITypeExpectation.getExpectedType()
may return
null
or some sort of unresolved, specialized reference. If null
is returned, clients
may want to check ITypeExpectation.isNoTypeExpectation()
or ITypeExpectation.isVoidTypeAllowed()
.null
.public TypeExpectation copyInto(ITypeReferenceOwner referenceOwner)