public static class Type.TypeVar extends Type implements TypeVariable
Type.AnnotatedType, Type.ArrayType, Type.CapturedType, Type.CapturedUndetVar, Type.ClassType, Type.DelegatedType, Type.ErasedClassType, Type.ErrorType, Type.ForAll, Type.IntersectionClassType, Type.JCNoType, Type.JCPrimitiveType, Type.JCVoidType, Type.Mapping, Type.MethodType, Type.PackageType, Type.TypeVar, Type.UndetVar, Type.UnionClassType, Type.UnknownType, Type.Visitor<R,S>, Type.WildcardType
Modifier and Type | Field and Description |
---|---|
Type |
bound
The upper bound of this type variable; set from outside.
|
Type |
lower
The lower bound of this type variable.
|
Constructor and Description |
---|
TypeVar(Name name,
Symbol owner,
Type lower) |
TypeVar(Symbol.TypeSymbol tsym,
Type bound,
Type lower) |
Modifier and Type | Method and Description |
---|---|
<R,S> R |
accept(Type.Visitor<R,S> v,
S s) |
<R,P> R |
accept(TypeVisitor<R,P> v,
P p)
Applies a visitor to this type.
|
TypeKind |
getKind()
Returns the
kind of this type. |
Type |
getLowerBound()
Returns the lower bound of this type variable.
|
TypeTag |
getTag()
Returns the current type tag.
|
Type |
getUpperBound()
Returns the upper bound of this type variable.
|
boolean |
isCaptured() |
boolean |
isNullOrReference() |
boolean |
isReference() |
allparams, annotatedType, argtypes, asElement, asMethodType, baseType, baseTypes, complete, constType, constValue, contains, contains, containsAny, containsAny, equals, filter, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getEnclosingType, getModelType, getModelTypes, getOriginalType, getParameterTypes, getReceiverType, getReturnType, getThrownTypes, getTypeArguments, hashCode, hasTag, isAnnotated, isCompound, isErroneous, isErroneous, isExtendsBound, isFalse, isFinal, isInterface, isNumeric, isParameterized, isPartial, isPrimitive, isPrimitiveOrVoid, isRaw, isSuperBound, isTrue, isUnbound, map, map, stringValue, toString, toString, unannotatedType, withTypeVar
getAttribute, getInheritedAnnotations
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asElement
equals, hashCode, toString
getAnnotation, getAnnotationMirrors, getAnnotationsByType
public Type bound
public Type lower
public TypeVar(Symbol.TypeSymbol tsym, Type bound, Type lower)
public <R,S> R accept(Type.Visitor<R,S> v, S s)
public Type getUpperBound()
TypeVariable
If this type variable was declared with no explicit
upper bounds, the result is java.lang.Object
.
If it was declared with multiple upper bounds,
the result is an intersection type;
individual bounds can be found by examining the result's
bounds.
getUpperBound
in interface TypeVariable
getUpperBound
in class Type
public Type getLowerBound()
TypeVariable
NullType
.getLowerBound
in interface TypeVariable
getLowerBound
in class Type
public TypeKind getKind()
TypeMirror
kind
of this type.getKind
in interface TypeMirror
getKind
in class Type
public boolean isCaptured()
public boolean isReference()
isReference
in class Type
public boolean isNullOrReference()
isNullOrReference
in class Type
public <R,P> R accept(TypeVisitor<R,P> v, P p)
TypeMirror
accept
in interface TypeMirror
accept
in class Type
R
- the return type of the visitor's methodsP
- the type of the additional parameter to the visitor's methodsv
- the visitor operating on this typep
- additional parameter to the visitorCopyright © 2015. All rights reserved.