public interface ITypeExpectation
Modifier and Type | Method and Description |
---|---|
void |
acceptActualType(LightweightTypeReference type,
ConformanceHint... hints) |
void |
acceptActualType(LightweightTypeReference type,
java.util.EnumSet<ConformanceHint> hints) |
void |
acceptActualType(LightweightTypeReference type,
int flags) |
ITypeExpectation |
copyInto(ITypeReferenceOwner referenceOwner) |
UnboundTypeReference |
createUnboundTypeReference(XExpression expression,
JvmTypeParameter typeParameter)
Create a new, managed
UnboundTypeReference for the given type parameter which was
first encountered for the given expression. |
LightweightTypeReference |
getExpectedType()
Returns the expected type.
|
ITypeReferenceOwner |
getReferenceOwner() |
boolean |
isNoTypeExpectation()
Returns
true if anything is allowed and no constraints are expected. |
boolean |
isOwnedBy(ITypeReferenceOwner referenceOwner) |
boolean |
isVoidTypeAllowed()
Returns
true if Void.TYPE is a valid type. |
void acceptActualType(LightweightTypeReference type, ConformanceHint... hints)
void acceptActualType(LightweightTypeReference type, java.util.EnumSet<ConformanceHint> hints)
void acceptActualType(LightweightTypeReference type, int flags)
ITypeReferenceOwner getReferenceOwner()
UnboundTypeReference createUnboundTypeReference(XExpression expression, JvmTypeParameter typeParameter)
UnboundTypeReference
for the given type parameter which was
first encountered for the given expression.expression
- the expression that used / referenced the type parametertypeParameter
- the type parameterITypeExpectation copyInto(ITypeReferenceOwner referenceOwner)
boolean isOwnedBy(ITypeReferenceOwner referenceOwner)
LightweightTypeReference getExpectedType()
getExpectedType()
may return
null
or some sort of unresolved, specialized reference. If null
is returned, clients
may want to check isNoTypeExpectation()
or isVoidTypeAllowed()
.null
.boolean isNoTypeExpectation()
true
if anything is allowed and no constraints are expected.true
if anything is allowed and no constraints are expected.boolean isVoidTypeAllowed()
true
if Void.TYPE
is a valid type. It may be the only valid type
or there may exist others.true
if primitive void
is allowed.