Class NoExpectation
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeExpectation
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractReturnAwareTypeExpectation
-
- org.eclipse.xtext.xbase.typesystem.internal.NoExpectation
-
- All Implemented Interfaces:
ITypeExpectation
public class NoExpectation extends AbstractReturnAwareTypeExpectation
-
-
Constructor Summary
Constructors Constructor Description NoExpectation(AbstractTypeComputationState state, boolean returnType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITypeExpectationcopyInto(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.AbstractReturnAwareTypeExpectation
acceptActualType, isReturnType
-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeExpectation
acceptActualType, acceptActualType, createUnboundTypeReference, getReferenceOwner, getResolvedTypes, getState, isOwnedBy, toString
-
-
-
-
Constructor Detail
-
NoExpectation
public NoExpectation(AbstractTypeComputationState state, boolean returnType)
-
-
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 ITypeExpectation copyInto(ITypeReferenceOwner referenceOwner)
-
-