name() of this type variable
corresponds to the raw type name. For type variables, the raw type name is the first upper bound. The
identifier() is the name of the type variable as present in the source code.
For example:
T extends NumberIn this case, the identifier is
T, while the name is java.lang.Number.
| Modifier and Type | Class and Description |
|---|---|
| public static class | TypeVariable.Builder
Convenient builder for |
| Modifier and Type | Field and Description |
|---|---|
| private final Type[] | |
| private int | |
| private static final int | |
| private final String | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv | |
| pack-priv | TypeVariable(String name, Type[] bounds, AnnotationInstance[] annotations, boolean implicitObjectBound)
|
| Modifier and Type | Method and Description |
|---|---|
| public TypeVariable | asTypeVariable()
Overrides org. org. and returns it if the kind is
Kind#TYPE_VARIABLE.
|
| pack-priv Type[] | |
| public List | |
| public static TypeVariable. | |
| pack-priv Type | |
| pack-priv TypeVariable | |
| public static TypeVariable | |
| public boolean | equals(Object
the type to compare to o)Overrides org. Type with another type.
|
| public int | |
| pack-priv boolean | |
| public String | Returns: the identifier of this type variableThe identifier of this type variable as it appears in Java source code. |
| pack-priv boolean | |
| pack-priv int | |
| public Type. | |
| public DotName | name()
Overrides org. DotName,
using the Class#getName() format.
|
| pack-priv String |
| bounds | back to summary |
|---|---|
| private final Type[] bounds | |
| hash | back to summary |
|---|---|
| private int hash | |
| HASH_MASK | back to summary |
|---|---|
| private static final int HASH_MASK | |
| identifier | back to summary |
|---|---|
| private final String identifier | |
| IMPLICIT_MASK | back to summary |
|---|---|
| private static final int IMPLICIT_MASK | |
| TypeVariable | back to summary |
|---|---|
| pack-priv TypeVariable(String name) | |
| TypeVariable | back to summary |
|---|---|
| pack-priv TypeVariable(String name, Type[] bounds) | |
| TypeVariable | back to summary |
|---|---|
| pack-priv TypeVariable(String name, Type[] bounds, AnnotationInstance[] annotations) | |
| TypeVariable | back to summary |
|---|---|
| pack-priv TypeVariable(String name, Type[] bounds, AnnotationInstance[] annotations, boolean implicitObjectBound) | |
| asTypeVariable | back to summary |
|---|---|
| public TypeVariable asTypeVariable() Overrides org. Doc from org. Casts this type to a
| |
| boundArray | back to summary |
|---|---|
| pack-priv Type[] boundArray() | |
| bounds | back to summary |
|---|---|
| public List | |
| builder | back to summary |
|---|---|
| public static TypeVariable. Create a builder of a type variable.
| |
| copyType | back to summary |
|---|---|
| pack-priv Type copyType(AnnotationInstance[] newAnnotations) Implements abstract org.
| |
| copyType | back to summary |
|---|---|
| pack-priv TypeVariable copyType(int boundIndex, Type bound) | |
| create | back to summary |
|---|---|
| public static TypeVariable create(String identifier) Create an instance of a type variable with the given
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides org. Doc from org. Compares this | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from org. Computes a hash code representing this type.
| |
| hasImplicitObjectBound | back to summary |
|---|---|
| pack-priv boolean hasImplicitObjectBound() | |
| identifier | back to summary |
|---|---|
| public String identifier() The identifier of this type variable as it appears in Java source code.
The following class has a type parameter with an identifier of
class Foo<T extends Number> {
}
| |
| internEquals | back to summary |
|---|---|
| pack-priv boolean internEquals(Object o) Overrides org.
| |
| internHashCode | back to summary |
|---|---|
| pack-priv int internHashCode() Overrides org.
| |
| kind | back to summary |
|---|---|
| public Type. Implements abstract org. Doc from org. Returns the kind of Type this is. | |
| name | back to summary |
|---|---|
| public DotName name() Overrides org. Doc from org. Returns the name of this type (or its erasure in case of generic types) as a
| |
| toString | back to summary |
|---|---|
| pack-priv String toString(boolean simple) Overrides org.
| |
TypeVariable. If no bound is added, the built
type variable will have a single bound of java.lang.Object.
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final String |
| Modifier and Type | Method and Description |
|---|---|
| public TypeVariable. | |
| public TypeVariable. | |
| public TypeVariable |
| bounds | back to summary |
|---|---|
| private final List<Type> bounds | |
| identifier | back to summary |
|---|---|
| private final String identifier | |
| Builder | back to summary |
|---|---|
| pack-priv Builder(String identifier) | |
| addBound | back to summary |
|---|---|
| public TypeVariable. Adds a bound.
| |
| addBound | back to summary |
|---|---|
| public TypeVariable. Adds a bound.
| |
| build | back to summary |
|---|---|
| public TypeVariable build() Returns the built type variable.
| |