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 ITypeExpectation
copyInto(ITypeReferenceOwner referenceOwner)
LightweightTypeReference
getExpectedType()
Returns the expected type.boolean
isNoTypeExpectation()
Returnstrue
if anything is allowed and no constraints are expected.boolean
isVoidTypeAllowed()
Returnstrue
ifVoid.TYPE
is 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:ITypeExpectation
Returns the expected type. The expected type may be not too concrete thusITypeExpectation.getExpectedType()
may returnnull
or some sort of unresolved, specialized reference. Ifnull
is 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:ITypeExpectation
Returnstrue
if anything is allowed and no constraints are expected.- Returns:
true
if anything is allowed and no constraints are expected.
-
isVoidTypeAllowed
public boolean isVoidTypeAllowed()
Description copied from interface:ITypeExpectation
Returnstrue
ifVoid.TYPE
is a valid type. It may be the only valid type or there may exist others.- Specified by:
isVoidTypeAllowed
in interfaceITypeExpectation
- Overrides:
isVoidTypeAllowed
in classAbstractTypeExpectation
- Returns:
true
if primitivevoid
is allowed.
-
copyInto
public ITypeExpectation copyInto(ITypeReferenceOwner referenceOwner)
-
-