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, isReturnTypeacceptActualType, acceptActualType, createUnboundTypeReference, getReferenceOwner, getResolvedTypes, getState, isOwnedBy, isVoidTypeAllowed, toStringpublic TypeExpectation(LightweightTypeReference reference, AbstractTypeComputationState state, boolean returnType)
public boolean isNoTypeExpectation()
ITypeExpectationtrue if anything is allowed and no constraints are expected.true if anything is allowed and no constraints are expected.public LightweightTypeReference getExpectedType()
ITypeExpectationITypeExpectation.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)