public abstract class AbstractTypeExpectation extends java.lang.Object implements ITypeExpectation
Modifier | Constructor and Description |
---|---|
protected |
AbstractTypeExpectation(AbstractTypeComputationState state) |
Modifier and Type | Method and Description |
---|---|
void |
acceptActualType(LightweightTypeReference type,
ConformanceHint... hints) |
void |
acceptActualType(LightweightTypeReference type,
java.util.EnumSet<ConformanceHint> hints) |
UnboundTypeReference |
createUnboundTypeReference(XExpression expression,
JvmTypeParameter typeParameter)
Create a new, managed
UnboundTypeReference 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()
Returns
true if Void.TYPE is a valid type. |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
acceptActualType, copyInto, getExpectedType, isNoTypeExpectation
protected AbstractTypeExpectation(AbstractTypeComputationState state)
public ITypeReferenceOwner getReferenceOwner()
getReferenceOwner
in interface ITypeExpectation
public void acceptActualType(LightweightTypeReference type, ConformanceHint... hints)
acceptActualType
in interface ITypeExpectation
public void acceptActualType(LightweightTypeReference type, java.util.EnumSet<ConformanceHint> hints)
acceptActualType
in interface ITypeExpectation
public boolean isVoidTypeAllowed()
ITypeExpectation
true
if Void.TYPE
is a valid type. It may be the only valid type
or there may exist others.isVoidTypeAllowed
in interface ITypeExpectation
true
if primitive void
is allowed.public boolean isOwnedBy(ITypeReferenceOwner referenceOwner)
isOwnedBy
in interface ITypeExpectation
protected AbstractTypeComputationState getState()
protected ResolvedTypes getResolvedTypes()
public UnboundTypeReference createUnboundTypeReference(XExpression expression, JvmTypeParameter typeParameter)
ITypeExpectation
UnboundTypeReference
for the given type parameter which was
first encountered for the given expression.createUnboundTypeReference
in interface ITypeExpectation
expression
- the expression that used / referenced the type parametertypeParameter
- the type parameterpublic java.lang.String toString()
toString
in class java.lang.Object