org.eclipse.xtext.xbase.typesystem.internal
Class RootNoExpectation

java.lang.Object
  extended by org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeExpectation
      extended by org.eclipse.xtext.xbase.typesystem.internal.AbstractRootTypeExpectation
          extended by org.eclipse.xtext.xbase.typesystem.internal.RootNoExpectation
All Implemented Interfaces:
ITypeExpectation

public class RootNoExpectation
extends AbstractRootTypeExpectation

Author:
Sebastian Zarnekow - Initial contribution and API TODO JavaDoc, toString

Constructor Summary
RootNoExpectation(AbstractTypeComputationState state)
           
 
Method Summary
 void acceptActualType(JvmTypeReference type, ConformanceHint hint)
           
 JvmTypeReference getExpectedType()
          Returns the expected type.
 boolean isNoTypeExpectation()
          Returns true if anything is allowed and no constraints are expected.
 boolean isVoidTypeAllowed()
          Returns true if Void.TYPE is a valid type.
 
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeExpectation
getState, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RootNoExpectation

public RootNoExpectation(AbstractTypeComputationState state)
Method Detail

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.

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.

isVoidTypeAllowed

public boolean isVoidTypeAllowed()
Description copied from interface: ITypeExpectation
Returns true if Void.TYPE is a valid type. It may be the only valid type or there may exist others.

Specified by:
isVoidTypeAllowed in interface ITypeExpectation
Overrides:
isVoidTypeAllowed in class AbstractTypeExpectation
Returns:
true if primitive void is allowed.

acceptActualType

public void acceptActualType(JvmTypeReference type,
                             ConformanceHint hint)
Specified by:
acceptActualType in interface ITypeExpectation
Overrides:
acceptActualType in class AbstractRootTypeExpectation