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 protected
AbstractTypeExpectation(AbstractTypeComputationState state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptActualType(LightweightTypeReference type, java.util.EnumSet<ConformanceHint> hints)
void
acceptActualType(LightweightTypeReference type, ConformanceHint... hints)
UnboundTypeReference
createUnboundTypeReference(XExpression expression, org.eclipse.xtext.common.types.JvmTypeParameter typeParameter)
Create a new, managedUnboundTypeReference
for the given type parameter which was first encountered for the given expression.ITypeReferenceOwner
getReferenceOwner()
protected ResolvedTypes
getResolvedTypes()
protected AbstractTypeComputationState
getState()
boolean
isOwnedBy(ITypeReferenceOwner referenceOwner)
boolean
isVoidTypeAllowed()
Returnstrue
ifVoid.TYPE
is a valid type.java.lang.String
toString()
-
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:
getReferenceOwner
in interfaceITypeExpectation
-
acceptActualType
public void acceptActualType(LightweightTypeReference type, ConformanceHint... hints)
- Specified by:
acceptActualType
in interfaceITypeExpectation
-
acceptActualType
public void acceptActualType(LightweightTypeReference type, java.util.EnumSet<ConformanceHint> hints)
- Specified by:
acceptActualType
in interfaceITypeExpectation
-
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
- Returns:
true
if primitivevoid
is allowed.
-
isOwnedBy
public boolean isOwnedBy(ITypeReferenceOwner referenceOwner)
- Specified by:
isOwnedBy
in 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:ITypeExpectation
Create a new, managedUnboundTypeReference
for the given type parameter which was first encountered for the given expression.- Specified by:
createUnboundTypeReference
in interfaceITypeExpectation
- Parameters:
expression
- the expression that used / referenced the type parametertypeParameter
- the type parameter
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-