Class RootExpressionTypeComputationState.PendingRootExpectation
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeExpectation
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractRootTypeExpectation
-
- org.eclipse.xtext.xbase.typesystem.internal.RootNoExpectation
-
- org.eclipse.xtext.xbase.typesystem.internal.RootExpressionTypeComputationState.PendingRootExpectation
-
- All Implemented Interfaces:
ITypeExpectation
- Enclosing class:
- RootExpressionTypeComputationState
protected static class RootExpressionTypeComputationState.PendingRootExpectation extends RootNoExpectation
-
-
Constructor Summary
Constructors Constructor Description PendingRootExpectation(AbstractTypeComputationState state, RootExpressionTypeComputationState rootState, boolean voidAllowed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptActualType(LightweightTypeReference type, int flags)LightweightTypeReferencegetExpectedType()Returns the expected type.booleanisNoTypeExpectation()Returnstrueif anything is allowed and no constraints are expected.booleanisVoidTypeAllowed()ReturnstrueifVoid.TYPEis a valid type.-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.RootNoExpectation
copyInto
-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeExpectation
acceptActualType, acceptActualType, createUnboundTypeReference, getReferenceOwner, getResolvedTypes, getState, isOwnedBy, toString
-
-
-
-
Constructor Detail
-
PendingRootExpectation
public PendingRootExpectation(AbstractTypeComputationState state, RootExpressionTypeComputationState rootState, boolean voidAllowed)
-
-
Method Detail
-
acceptActualType
public void acceptActualType(LightweightTypeReference type, int flags)
- Specified by:
acceptActualTypein interfaceITypeExpectation- Overrides:
acceptActualTypein classAbstractRootTypeExpectation
-
getExpectedType
public LightweightTypeReference getExpectedType()
Description copied from interface:ITypeExpectationReturns the expected type. The expected type may be not too concrete thusITypeExpectation.getExpectedType()may returnnullor some sort of unresolved, specialized reference. Ifnullis returned, clients may want to checkITypeExpectation.isNoTypeExpectation()orITypeExpectation.isVoidTypeAllowed().- Specified by:
getExpectedTypein interfaceITypeExpectation- Overrides:
getExpectedTypein classRootNoExpectation- Returns:
- the expected type. This may be
null.
-
isNoTypeExpectation
public boolean isNoTypeExpectation()
Description copied from interface:ITypeExpectationReturnstrueif anything is allowed and no constraints are expected.- Specified by:
isNoTypeExpectationin interfaceITypeExpectation- Overrides:
isNoTypeExpectationin classRootNoExpectation- Returns:
trueif anything is allowed and no constraints are expected.
-
isVoidTypeAllowed
public boolean isVoidTypeAllowed()
Description copied from interface:ITypeExpectationReturnstrueifVoid.TYPEis a valid type. It may be the only valid type or there may exist others.- Specified by:
isVoidTypeAllowedin interfaceITypeExpectation- Overrides:
isVoidTypeAllowedin classRootNoExpectation- Returns:
trueif primitivevoidis allowed.
-
-