public final class AnnotatedParameterizedTypes
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
AnnotatedParameterizedTypes.AnnotatedParameterizedTypeInternal |
Modifier and Type | Method and Description |
---|---|
static java.util.stream.Stream<java.util.Map.Entry<java.lang.reflect.TypeVariable<?>,java.lang.reflect.AnnotatedType>> |
getAllTypeArguments(java.lang.reflect.AnnotatedParameterizedType type)
For a given parameterized type, we retrieve a mapping of all type variables
on its raw type, as given by
ParameterizedTypes.getAllTypeParameters(Class) applied to the raw
type of this annotated type, to their annotated arguments within the
context of this type. |
static java.lang.reflect.AnnotatedParameterizedType |
over(java.lang.reflect.ParameterizedType type,
java.lang.annotation.Annotation... annotations)
Annotate an existing
ParameterizedType with the given annotations. |
static java.lang.reflect.AnnotatedParameterizedType |
over(java.lang.reflect.ParameterizedType type,
java.util.Collection<java.lang.annotation.Annotation> annotations)
Annotate an existing
ParameterizedType with the given annotations. |
static java.lang.reflect.AnnotatedType |
parameterize(java.lang.reflect.AnnotatedType rawType,
java.lang.reflect.AnnotatedType... arguments)
Parameterize a generic class with the given annotated type arguments.
|
static java.lang.reflect.AnnotatedParameterizedType |
parameterize(java.lang.reflect.AnnotatedType rawType,
java.util.function.Function<? super java.lang.reflect.TypeVariable<?>,? extends java.lang.reflect.AnnotatedType> arguments)
Parameterize a generic class with the given annotated type arguments.
|
static java.lang.reflect.AnnotatedType |
parameterize(java.lang.reflect.AnnotatedType rawType,
java.util.List<java.lang.reflect.AnnotatedType> arguments)
Parameterize a generic class with the given annotated type arguments.
|
static java.lang.reflect.AnnotatedParameterizedType |
parameterize(java.lang.Class<?> rawType,
java.util.function.Function<? super java.lang.reflect.TypeVariable<?>,? extends java.lang.reflect.AnnotatedType> arguments,
java.lang.annotation.Annotation... annotations)
Parameterize a generic class with the given annotated type arguments.
|
static java.lang.reflect.AnnotatedParameterizedType |
wrap(java.lang.reflect.AnnotatedParameterizedType type)
Wrap an existing annotated parameterized type.
|
protected static AnnotatedParameterizedTypes.AnnotatedParameterizedTypeInternal |
wrapImpl(java.lang.reflect.AnnotatedParameterizedType type) |
protected static AnnotatedParameterizedTypes.AnnotatedParameterizedTypeInternal |
wrapImpl(Isomorphism isomorphism,
java.lang.reflect.AnnotatedParameterizedType type) |
public static java.lang.reflect.AnnotatedParameterizedType over(java.lang.reflect.ParameterizedType type, java.lang.annotation.Annotation... annotations)
ParameterizedType
with the given annotations.type
- The parameterized type we wish to annotate.annotations
- Annotations to put on the resulting
AnnotatedParameterizedType
.AnnotatedParameterizedType
instance over the given
parameterized type, with the given annotations.public static java.lang.reflect.AnnotatedParameterizedType over(java.lang.reflect.ParameterizedType type, java.util.Collection<java.lang.annotation.Annotation> annotations)
ParameterizedType
with the given annotations.type
- The parameterized type we wish to annotate.annotations
- Annotations to put on the resulting
AnnotatedParameterizedType
.AnnotatedParameterizedType
instance over the given
parameterized type, with the given annotations.public static java.lang.reflect.AnnotatedParameterizedType parameterize(java.lang.reflect.AnnotatedType rawType, java.util.function.Function<? super java.lang.reflect.TypeVariable<?>,? extends java.lang.reflect.AnnotatedType> arguments)
rawType
- The annotated generic class we wish to parameterize.arguments
- A mapping from the type variables on the generic class to their
annotated arguments. AnnotatedParameterizedType
.AnnotatedParameterizedType
instance with the given
type arguments, and the given annotations.public static java.lang.reflect.AnnotatedParameterizedType parameterize(java.lang.Class<?> rawType, java.util.function.Function<? super java.lang.reflect.TypeVariable<?>,? extends java.lang.reflect.AnnotatedType> arguments, java.lang.annotation.Annotation... annotations)
rawType
- The generic class we wish to parameterize.arguments
- A mapping from the type variables on the generic class to their
annotated arguments.annotations
- Annotations to put on the resulting
AnnotatedParameterizedType
.AnnotatedParameterizedType
instance with the given
type arguments, and the given annotations.public static java.lang.reflect.AnnotatedType parameterize(java.lang.reflect.AnnotatedType rawType, java.lang.reflect.AnnotatedType... arguments)
rawType
- The annotated generic class we wish to parameterize.arguments
- A mapping from the type variables on the generic class to their
annotated arguments.AnnotatedParameterizedType
instance with the given
type arguments, and the given annotations.public static java.lang.reflect.AnnotatedType parameterize(java.lang.reflect.AnnotatedType rawType, java.util.List<java.lang.reflect.AnnotatedType> arguments)
rawType
- The annotated generic class we wish to parameterize.arguments
- A mapping from the type variables on the generic class to their
annotated arguments.AnnotatedParameterizedType
instance with the given
type arguments, and the given annotations.public static java.util.stream.Stream<java.util.Map.Entry<java.lang.reflect.TypeVariable<?>,java.lang.reflect.AnnotatedType>> getAllTypeArguments(java.lang.reflect.AnnotatedParameterizedType type)
ParameterizedTypes.getAllTypeParameters(Class)
applied to the raw
type of this annotated type, to their annotated arguments within the
context of this type.type
- The type whose generic type arguments we wish to determine.protected static AnnotatedParameterizedTypes.AnnotatedParameterizedTypeInternal wrapImpl(java.lang.reflect.AnnotatedParameterizedType type)
protected static AnnotatedParameterizedTypes.AnnotatedParameterizedTypeInternal wrapImpl(Isomorphism isomorphism, java.lang.reflect.AnnotatedParameterizedType type)
public static java.lang.reflect.AnnotatedParameterizedType wrap(java.lang.reflect.AnnotatedParameterizedType type)
type
- The type we wish to wrap.AnnotatedParameterizedType
which is equal
to the given type.