@HashCodeAndEqualsPlugin.Enhance public abstract static class TypeDescription.Generic.Builder extends java.lang.Object
TypeDescription.Generic
.Modifier and Type | Class and Description |
---|---|
protected static class |
TypeDescription.Generic.Builder.OfGenericArrayType
A generic type builder building a generic array type.
|
protected static class |
TypeDescription.Generic.Builder.OfNonGenericType
A generic type builder for building a non-generic type.
|
protected static class |
TypeDescription.Generic.Builder.OfParameterizedType
A generic type builder for building a parameterized type.
|
protected static class |
TypeDescription.Generic.Builder.OfTypeVariable
A generic type builder building a symbolic type variable.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.List<? extends AnnotationDescription> |
annotations
The type annotations of the current annotated type.
|
private static java.lang.reflect.Type |
UNDEFINED
Represents an undefined
Type within a build step. |
Modifier | Constructor and Description |
---|---|
protected |
Builder(java.util.List<? extends AnnotationDescription> annotations)
Creates a new builder for a generic type description.
|
Modifier and Type | Method and Description |
---|---|
TypeDescription.Generic.Builder |
annotate(java.lang.annotation.Annotation... annotation)
Defines type annotations to be declared by the current type.
|
TypeDescription.Generic.Builder |
annotate(AnnotationDescription... annotation)
Defines type annotations to be declared by the current type.
|
TypeDescription.Generic.Builder |
annotate(java.util.Collection<? extends AnnotationDescription> annotations)
Defines type annotations to be declared by the current type.
|
TypeDescription.Generic.Builder |
annotate(java.util.List<? extends java.lang.annotation.Annotation> annotations)
Defines type annotations to be declared by the current type.
|
TypeDescription.Generic.Builder |
asArray()
Represents the built type into an array.
|
TypeDescription.Generic.Builder |
asArray(int arity)
Represents the built type into an array.
|
TypeDescription.Generic |
asWildcardLowerBound()
Transforms this type into the lower bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardLowerBound(java.lang.annotation.Annotation... annotation)
Transforms this type into the lower bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardLowerBound(AnnotationDescription... annotation)
Transforms this type into the lower bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardLowerBound(java.util.Collection<? extends AnnotationDescription> annotations)
Transforms this type into the lower bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardLowerBound(java.util.List<? extends java.lang.annotation.Annotation> annotations)
Transforms this type into the lower bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardUpperBound()
Transforms this type into the upper bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardUpperBound(java.lang.annotation.Annotation... annotation)
Transforms this type into the upper bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardUpperBound(AnnotationDescription... annotation)
Transforms this type into the upper bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardUpperBound(java.util.Collection<? extends AnnotationDescription> annotations)
Transforms this type into the upper bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardUpperBound(java.util.List<? extends java.lang.annotation.Annotation> annotations)
Transforms this type into the upper bound of a wildcard type.
|
TypeDescription.Generic |
build()
Finalizes the build and finalizes the created type as a generic type description.
|
TypeDescription.Generic |
build(java.lang.annotation.Annotation... annotation)
Finalizes the build and finalizes the created type as a generic type description.
|
TypeDescription.Generic |
build(AnnotationDescription... annotation)
Finalizes the build and finalizes the created type as a generic type description.
|
TypeDescription.Generic |
build(java.util.Collection<? extends AnnotationDescription> annotations)
Finalizes the build and finalizes the created type as a generic type description.
|
TypeDescription.Generic |
build(java.util.List<? extends java.lang.annotation.Annotation> annotations)
Finalizes the build and finalizes the created type as a generic type description.
|
protected abstract TypeDescription.Generic.Builder |
doAnnotate(java.util.List<? extends AnnotationDescription> annotations)
Creates a new builder for the current type and the applied type annotations.
|
protected abstract TypeDescription.Generic |
doBuild()
Builds the generic type.
|
static TypeDescription.Generic.Builder |
parameterizedType(java.lang.Class<?> rawType,
java.util.List<? extends java.lang.reflect.Type> parameters)
Creates a parameterized type without an owner type or with a non-generic owner type.
|
static TypeDescription.Generic.Builder |
parameterizedType(java.lang.Class<?> rawType,
java.lang.reflect.Type... parameter)
Creates a parameterized type without an owner type or with a non-generic owner type.
|
static TypeDescription.Generic.Builder |
parameterizedType(java.lang.Class<?> rawType,
java.lang.reflect.Type ownerType,
java.util.List<? extends java.lang.reflect.Type> parameters)
Creates a parameterized type.
|
static TypeDescription.Generic.Builder |
parameterizedType(TypeDescription rawType,
java.util.Collection<? extends TypeDefinition> parameters)
Creates a parameterized type without an owner type or with a non-generic owner type.
|
static TypeDescription.Generic.Builder |
parameterizedType(TypeDescription rawType,
TypeDefinition... parameter)
Creates a parameterized type without an owner type or with a non-generic owner type.
|
static TypeDescription.Generic.Builder |
parameterizedType(TypeDescription rawType,
TypeDescription.Generic ownerType,
java.util.Collection<? extends TypeDefinition> parameters)
Creates a parameterized type.
|
static TypeDescription.Generic.Builder |
rawType(java.lang.Class<?> type)
Creates a raw type of a type description.
|
static TypeDescription.Generic.Builder |
rawType(java.lang.Class<?> type,
TypeDescription.Generic ownerType)
Creates a raw type of a type description where the supplied owner type is used as .
|
static TypeDescription.Generic.Builder |
rawType(TypeDescription type)
Creates a raw type of a type description.
|
static TypeDescription.Generic.Builder |
rawType(TypeDescription type,
TypeDescription.Generic ownerType)
Creates a raw type of a type description.
|
static TypeDescription.Generic.Builder |
typeVariable(java.lang.String symbol)
Creates a symbolic type variable of the given name.
|
static TypeDescription.Generic |
unboundWildcard()
Creates an unbound wildcard without type annotations.
|
static TypeDescription.Generic |
unboundWildcard(java.lang.annotation.Annotation... annotation)
Creates an unbound wildcard.
|
static TypeDescription.Generic |
unboundWildcard(AnnotationDescription... annotation)
Creates an unbound wildcard.
|
static TypeDescription.Generic |
unboundWildcard(java.util.Collection<? extends AnnotationDescription> annotations)
Creates an unbound wildcard.
|
static TypeDescription.Generic |
unboundWildcard(java.util.List<? extends java.lang.annotation.Annotation> annotations)
Creates an unbound wildcard.
|
private static final java.lang.reflect.Type UNDEFINED
Type
within a build step.protected final java.util.List<? extends AnnotationDescription> annotations
protected Builder(java.util.List<? extends AnnotationDescription> annotations)
annotations
- The type annotations of the current annotated type.public static TypeDescription.Generic.Builder rawType(java.lang.Class<?> type)
type
- The type to represent as a raw type.public static TypeDescription.Generic.Builder rawType(TypeDescription type)
type
- The type to represent as a raw type.public static TypeDescription.Generic.Builder rawType(java.lang.Class<?> type, TypeDescription.Generic ownerType)
type
- The type to represent as a raw type.ownerType
- The raw type's (annotated) declaring type or null
if no owner type should be declared.public static TypeDescription.Generic.Builder rawType(TypeDescription type, TypeDescription.Generic ownerType)
type
- The type to represent as a raw type.ownerType
- The raw type's (annotated) declaring type or null
if no owner type should be declared.public static TypeDescription.Generic unboundWildcard()
public static TypeDescription.Generic unboundWildcard(java.lang.annotation.Annotation... annotation)
annotation
- The type annotations of the unbound wildcard.public static TypeDescription.Generic unboundWildcard(java.util.List<? extends java.lang.annotation.Annotation> annotations)
annotations
- The type annotations of the unbound wildcard.public static TypeDescription.Generic unboundWildcard(AnnotationDescription... annotation)
annotation
- The type annotations of the unbound wildcard.public static TypeDescription.Generic unboundWildcard(java.util.Collection<? extends AnnotationDescription> annotations)
annotations
- The type annotations of the unbound wildcard.public static TypeDescription.Generic.Builder typeVariable(java.lang.String symbol)
symbol
- The symbolic name of the type variable.public static TypeDescription.Generic.Builder parameterizedType(java.lang.Class<?> rawType, java.lang.reflect.Type... parameter)
rawType
- A raw version of the type to describe as a parameterized type.parameter
- The type arguments to attach to the raw type as parameters.public static TypeDescription.Generic.Builder parameterizedType(java.lang.Class<?> rawType, java.util.List<? extends java.lang.reflect.Type> parameters)
rawType
- A raw version of the type to describe as a parameterized type.parameters
- The type arguments to attach to the raw type as parameters.public static TypeDescription.Generic.Builder parameterizedType(java.lang.Class<?> rawType, java.lang.reflect.Type ownerType, java.util.List<? extends java.lang.reflect.Type> parameters)
rawType
- A raw version of the type to describe as a parameterized type.ownerType
- The owner type of the parameterized type.parameters
- The type arguments to attach to the raw type as parameters.public static TypeDescription.Generic.Builder parameterizedType(TypeDescription rawType, TypeDefinition... parameter)
rawType
- A raw version of the type to describe as a parameterized type.parameter
- The type arguments to attach to the raw type as parameters.public static TypeDescription.Generic.Builder parameterizedType(TypeDescription rawType, java.util.Collection<? extends TypeDefinition> parameters)
rawType
- A raw version of the type to describe as a parameterized type.parameters
- The type arguments to attach to the raw type as parameters.public static TypeDescription.Generic.Builder parameterizedType(TypeDescription rawType, TypeDescription.Generic ownerType, java.util.Collection<? extends TypeDefinition> parameters)
rawType
- A raw version of the type to describe as a parameterized type.ownerType
- The owner type of the parameterized type.parameters
- The type arguments to attach to the raw type as parameters.public TypeDescription.Generic asWildcardUpperBound()
public TypeDescription.Generic asWildcardUpperBound(java.lang.annotation.Annotation... annotation)
annotation
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic asWildcardUpperBound(java.util.List<? extends java.lang.annotation.Annotation> annotations)
annotations
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic asWildcardUpperBound(AnnotationDescription... annotation)
annotation
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic asWildcardUpperBound(java.util.Collection<? extends AnnotationDescription> annotations)
annotations
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic asWildcardLowerBound()
public TypeDescription.Generic asWildcardLowerBound(java.lang.annotation.Annotation... annotation)
annotation
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic asWildcardLowerBound(java.util.List<? extends java.lang.annotation.Annotation> annotations)
annotations
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic asWildcardLowerBound(AnnotationDescription... annotation)
annotation
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic asWildcardLowerBound(java.util.Collection<? extends AnnotationDescription> annotations)
annotations
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic.Builder asArray()
public TypeDescription.Generic.Builder asArray(int arity)
arity
- The arity of the array.public TypeDescription.Generic.Builder annotate(java.lang.annotation.Annotation... annotation)
annotation
- Type annotations to be declared by the current type.public TypeDescription.Generic.Builder annotate(java.util.List<? extends java.lang.annotation.Annotation> annotations)
annotations
- Type annotations to be declared by the current type.public TypeDescription.Generic.Builder annotate(AnnotationDescription... annotation)
annotation
- Type annotations to be declared by the current type.public TypeDescription.Generic.Builder annotate(java.util.Collection<? extends AnnotationDescription> annotations)
annotations
- Type annotations to be declared by the current type.protected abstract TypeDescription.Generic.Builder doAnnotate(java.util.List<? extends AnnotationDescription> annotations)
annotations
- Type annotations to be declared by the current type.public TypeDescription.Generic build()
public TypeDescription.Generic build(java.lang.annotation.Annotation... annotation)
annotation
- Type annotations place for the built generic type to declare.public TypeDescription.Generic build(java.util.List<? extends java.lang.annotation.Annotation> annotations)
annotations
- Type annotations place for the built generic type to declare.public TypeDescription.Generic build(AnnotationDescription... annotation)
annotation
- Type annotations place for the built generic type to declare.public TypeDescription.Generic build(java.util.Collection<? extends AnnotationDescription> annotations)
annotations
- Type annotations place for the built generic type to declare.protected abstract TypeDescription.Generic doBuild()