protected static class RootExpressionTypeComputationState.PendingRootExpectation extends RootNoExpectation
| Constructor and Description |
|---|
PendingRootExpectation(AbstractTypeComputationState state,
RootExpressionTypeComputationState rootState,
boolean voidAllowed) |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptActualType(LightweightTypeReference type,
int flags) |
LightweightTypeReference |
getExpectedType()
Returns the expected type.
|
boolean |
isNoTypeExpectation()
Returns
true if anything is allowed and no constraints are expected. |
boolean |
isVoidTypeAllowed()
Returns
true if Void.TYPE is a valid type. |
copyIntoacceptActualType, acceptActualType, createUnboundTypeReference, getReferenceOwner, getResolvedTypes, getState, isOwnedBy, toStringpublic PendingRootExpectation(AbstractTypeComputationState state, RootExpressionTypeComputationState rootState, boolean voidAllowed)
public void acceptActualType(LightweightTypeReference type, int flags)
acceptActualType in interface ITypeExpectationacceptActualType in class AbstractRootTypeExpectationpublic 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().getExpectedType in interface ITypeExpectationgetExpectedType in class RootNoExpectationnull.public boolean isNoTypeExpectation()
ITypeExpectationtrue if anything is allowed and no constraints are expected.isNoTypeExpectation in interface ITypeExpectationisNoTypeExpectation in class RootNoExpectationtrue if anything is allowed and no constraints are expected.public boolean isVoidTypeAllowed()
ITypeExpectationtrue if Void.TYPE is a valid type. It may be the only valid type
or there may exist others.isVoidTypeAllowed in interface ITypeExpectationisVoidTypeAllowed in class RootNoExpectationtrue if primitive void is allowed.