public class InnerTypeReference extends ParameterizedTypeReference
LightweightTypeReference.IdentifierFunction, LightweightTypeReference.JavaIdentifierFunction, LightweightTypeReference.SimpleNameFunction, LightweightTypeReference.UniqueIdentifierFunction
resolved
KIND_ANY_TYPE_REFERENCE, KIND_ARRAY_TYPE_REFERENCE, KIND_COMPOUND_TYPE_REFERENCE, KIND_FUNCTION_TYPE_REFERENCE, KIND_INNER_FUNCTION_TYPE_REFERENCE, KIND_INNER_TYPE_REFERENCE, KIND_LIGHTWEIGHT_TYPE_REFERENCE, KIND_PARAMETERIZED_TYPE_REFERENCE, KIND_UNBOUND_TYPE_REFERENCE, KIND_UNKNOWN_TYPE_REFERENCE, KIND_WILDCARD_TYPE_REFERENCE
Constructor and Description |
---|
InnerTypeReference(ITypeReferenceOwner owner,
LightweightTypeReference outer,
JvmType type) |
Modifier and Type | Method and Description |
---|---|
void |
accept(TypeReferenceVisitor visitor) |
<Param> void |
accept(TypeReferenceVisitorWithParameter<Param> visitor,
Param param) |
<Param,Result> |
accept(TypeReferenceVisitorWithParameterAndResult<Param,Result> visitor,
Param param) |
<Result> Result |
accept(TypeReferenceVisitorWithResult<Result> visitor) |
protected void |
checkStaticFlag(JvmDeclaredType type) |
protected ParameterizedTypeReference |
doCopyInto(ITypeReferenceOwner owner) |
protected java.lang.String |
getAsString(java.lang.String type,
com.google.common.base.Function<LightweightTypeReference,java.lang.String> format) |
int |
getKind()
Subclasses must override this method.
|
LightweightTypeReference |
getOuter() |
LightweightTypeReference |
getRawTypeReference() |
boolean |
hasTypeArguments() |
boolean |
isOwnedBy(ITypeReferenceOwner owner) |
boolean |
isRawType()
Returns
true is this type points to a raw type. |
boolean |
isResolved() |
boolean |
isVisible(IVisibilityHelper visibilityHelper)
Returns
true if this type is fully visible according to the given visibilityHelper . |
ParameterizedTypeReference |
toInstanceTypeReference()
Returns a projection of this type to the instance level.
|
JvmTypeReference |
toJavaCompliantTypeReference(IVisibilityHelper visibilityHelper)
Converts this type reference to a
JvmTypeReference that can
be used in Java source code. |
JvmTypeReference |
toTypeReference() |
addTypeArgument, copyTypeArguments, createRawTypeReference, getAsFunctionTypeReference, getFunctionTypeKind, getIdentifier, getJavaIdentifier, getPrimitiveIfWrapperType, getPrimitiveKind, getPrimitiveKindIfWrapperType, getRawSuperType, getRawTypes, getSimpleName, getSuperType, getSuperType, getSuperTypes, getType, getTypeArguments, getUniqueIdentifier, getWrapperTypeIfPrimitive, isAnonymous, isInner, isInterfaceType, isPrimitive, isPrimitiveVoid, isType, isTypeVisible, isWrapper, tryConvertToArray, tryConvertToFunctionTypeReference, tryConvertToListType
collectSuperTypes, collectSuperTypes, copyInto, createSubstitutor, expose, findNonNullType, findType, getAllSuperTypes, getComponentType, getHumanReadableName, getInvariantBoundSubstitute, getLowerBoundSubstitute, getMultiTypeComponents, getNamedType, getNonInterfaceTypes, getOwner, getServices, getSuperTypes, getTypesFactory, getUniqueIdentifier, getUpperBoundSubstitute, internalFindTopLevelType, internalIsAssignableFrom, isAny, isArray, isAssignableFrom, isAssignableFrom, isAssignableFrom, isAssignableFrom, isFunctionType, isMultiType, isSubtypeOf, isSubtypeOf, isSynonym, isUnknown, isValidHint, isWildcard, toJavaCompliantTypeReference, toJavaCompliantTypeReference, toJavaType, toString
public InnerTypeReference(ITypeReferenceOwner owner, LightweightTypeReference outer, JvmType type)
protected void checkStaticFlag(JvmDeclaredType type)
checkStaticFlag
in class ParameterizedTypeReference
public int getKind()
ParameterizedTypeReference
getKind
in class ParameterizedTypeReference
public LightweightTypeReference getOuter()
getOuter
in class LightweightTypeReference
public boolean hasTypeArguments()
hasTypeArguments
in class LightweightTypeReference
public boolean isResolved()
isResolved
in class ParameterizedTypeReference
public LightweightTypeReference getRawTypeReference()
getRawTypeReference
in class ParameterizedTypeReference
public JvmTypeReference toTypeReference()
toTypeReference
in class ParameterizedTypeReference
public JvmTypeReference toJavaCompliantTypeReference(IVisibilityHelper visibilityHelper)
LightweightTypeReference
JvmTypeReference
that can
be used in Java source code.toJavaCompliantTypeReference
in class ParameterizedTypeReference
public boolean isRawType()
LightweightTypeReference
true
is this type points to a raw type.
That is, it points to a parameterized type but does not define type arguments or
it points to an external type parameter that has a raw type constraint.
Type parameters that are declared by the current owner are not considered to be raw types.
A type is also a raw type if it inherits from a raw type.isRawType
in class ParameterizedTypeReference
public boolean isOwnedBy(ITypeReferenceOwner owner)
isOwnedBy
in class ParameterizedTypeReference
public boolean isVisible(IVisibilityHelper visibilityHelper)
LightweightTypeReference
true
if this type is fully visible according to the given visibilityHelper
.
All components and bounds are taken into account, e.g.
arrays
use their component type
and generified types
check their type arguments, too.isVisible
in class ParameterizedTypeReference
protected ParameterizedTypeReference doCopyInto(ITypeReferenceOwner owner)
doCopyInto
in class ParameterizedTypeReference
protected java.lang.String getAsString(java.lang.String type, com.google.common.base.Function<LightweightTypeReference,java.lang.String> format)
getAsString
in class ParameterizedTypeReference
public void accept(TypeReferenceVisitor visitor)
accept
in class ParameterizedTypeReference
public <Param> void accept(TypeReferenceVisitorWithParameter<Param> visitor, Param param)
accept
in class ParameterizedTypeReference
public <Result> Result accept(TypeReferenceVisitorWithResult<Result> visitor)
accept
in class ParameterizedTypeReference
public <Param,Result> Result accept(TypeReferenceVisitorWithParameterAndResult<Param,Result> visitor, Param param)
accept
in class ParameterizedTypeReference
public ParameterizedTypeReference toInstanceTypeReference()
ParameterizedTypeReference
ArrayList<? extends Iterable<? extends String>>
is ArrayList<Iterable<? extends String>>
since it is possible to create instances
of ArrayList<Iterable<? extends String>>
.toInstanceTypeReference
in class ParameterizedTypeReference