org.eclipse.xtext.xbase.typesystem.internal
Class ObservableTypeExpectation
java.lang.Object
org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeExpectation
org.eclipse.xtext.xbase.typesystem.internal.AbstractReturnAwareTypeExpectation
org.eclipse.xtext.xbase.typesystem.internal.ObservableTypeExpectation
- All Implemented Interfaces:
- ITypeExpectation
public class ObservableTypeExpectation
- extends AbstractReturnAwareTypeExpectation
- Author:
- Sebastian Zarnekow - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ObservableTypeExpectation
public ObservableTypeExpectation(IJvmTypeReferenceProvider expectedType,
AbstractTypeComputationState state,
boolean returnType,
org.eclipse.xtext.xbase.typesystem.internal.ObservableTypeExpectation.Observer observer)
acceptActualType
public void acceptActualType(JvmTypeReference type,
ConformanceHint conformanceHint)
- Specified by:
acceptActualType
in interface ITypeExpectation
- Overrides:
acceptActualType
in class AbstractReturnAwareTypeExpectation
isNoTypeExpectation
public boolean isNoTypeExpectation()
- Description copied from interface:
ITypeExpectation
- Returns
true
if anything is allowed and no constraints are expected.
- Returns:
true
if anything is allowed and no constraints are expected.
getExpectedType
public JvmTypeReference getExpectedType()
- Description copied from interface:
ITypeExpectation
- Returns the expected type. The expected type may be not too concrete thus
ITypeExpectation.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()
.
- Returns:
- the expected type. This may be
null
.