Class AbstractTypeExpectation
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeExpectation
-
- All Implemented Interfaces:
ITypeExpectation
- Direct Known Subclasses:
AbstractReturnAwareTypeExpectation,AbstractRootTypeExpectation
public abstract class AbstractTypeExpectation extends java.lang.Object implements ITypeExpectation
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTypeExpectation(AbstractTypeComputationState state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptActualType(LightweightTypeReference type, java.util.EnumSet<ConformanceHint> hints)voidacceptActualType(LightweightTypeReference type, ConformanceHint... hints)UnboundTypeReferencecreateUnboundTypeReference(XExpression expression, org.eclipse.xtext.common.types.JvmTypeParameter typeParameter)Create a new, managedUnboundTypeReferencefor the given type parameter which was first encountered for the given expression.ITypeReferenceOwnergetReferenceOwner()protected ResolvedTypesgetResolvedTypes()protected AbstractTypeComputationStategetState()booleanisOwnedBy(ITypeReferenceOwner referenceOwner)booleanisVoidTypeAllowed()ReturnstrueifVoid.TYPEis a valid type.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.xtext.xbase.typesystem.computation.ITypeExpectation
acceptActualType, copyInto, getExpectedType, isNoTypeExpectation
-
-
-
-
Constructor Detail
-
AbstractTypeExpectation
protected AbstractTypeExpectation(AbstractTypeComputationState state)
-
-
Method Detail
-
getReferenceOwner
public ITypeReferenceOwner getReferenceOwner()
- Specified by:
getReferenceOwnerin interfaceITypeExpectation
-
acceptActualType
public void acceptActualType(LightweightTypeReference type, ConformanceHint... hints)
- Specified by:
acceptActualTypein interfaceITypeExpectation
-
acceptActualType
public void acceptActualType(LightweightTypeReference type, java.util.EnumSet<ConformanceHint> hints)
- Specified by:
acceptActualTypein interfaceITypeExpectation
-
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- Returns:
trueif primitivevoidis allowed.
-
isOwnedBy
public boolean isOwnedBy(ITypeReferenceOwner referenceOwner)
- Specified by:
isOwnedByin interfaceITypeExpectation
-
getState
protected AbstractTypeComputationState getState()
-
getResolvedTypes
protected ResolvedTypes getResolvedTypes()
-
createUnboundTypeReference
public UnboundTypeReference createUnboundTypeReference(XExpression expression, org.eclipse.xtext.common.types.JvmTypeParameter typeParameter)
Description copied from interface:ITypeExpectationCreate a new, managedUnboundTypeReferencefor the given type parameter which was first encountered for the given expression.- Specified by:
createUnboundTypeReferencein interfaceITypeExpectation- Parameters:
expression- the expression that used / referenced the type parametertypeParameter- the type parameter
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-