Class RootNoExpectation
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeExpectation
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractRootTypeExpectation
-
- org.eclipse.xtext.xbase.typesystem.internal.RootNoExpectation
-
- All Implemented Interfaces:
ITypeExpectation
- Direct Known Subclasses:
RootExpressionTypeComputationState.PendingRootExpectation
public class RootNoExpectation extends AbstractRootTypeExpectation
-
-
Constructor Summary
Constructors Constructor Description RootNoExpectation(AbstractTypeComputationState state, boolean voidAllowed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RootNoExpectationcopyInto(ITypeReferenceOwner referenceOwner)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.AbstractRootTypeExpectation
acceptActualType
-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeExpectation
acceptActualType, acceptActualType, createUnboundTypeReference, getReferenceOwner, getResolvedTypes, getState, isOwnedBy, toString
-
-
-
-
Constructor Detail
-
RootNoExpectation
public RootNoExpectation(AbstractTypeComputationState state, boolean voidAllowed)
-
-
Method Detail
-
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().- 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.- 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 classAbstractTypeExpectation- Returns:
trueif primitivevoidis allowed.
-
copyInto
public RootNoExpectation copyInto(ITypeReferenceOwner referenceOwner)
-
-