@HashCodeAndEqualsPlugin.Enhance public abstract static class TypeDescription.Generic.Builder extends 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 List<? extends AnnotationDescription> |
annotations
The type annotations of the current annotated type.
|
Modifier | Constructor and Description |
---|---|
protected |
Builder(List<? extends AnnotationDescription> annotations)
Creates a new builder for a generic type description.
|
Modifier and Type | Method and Description |
---|---|
TypeDescription.Generic.Builder |
annotate(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(Collection<? extends AnnotationDescription> annotations)
Defines type annotations to be declared by the current type.
|
TypeDescription.Generic.Builder |
annotate(List<? extends 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(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(Collection<? extends AnnotationDescription> annotations)
Transforms this type into the lower bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardLowerBound(List<? extends 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(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(Collection<? extends AnnotationDescription> annotations)
Transforms this type into the upper bound of a wildcard type.
|
TypeDescription.Generic |
asWildcardUpperBound(List<? extends 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(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(Collection<? extends AnnotationDescription> annotations)
Finalizes the build and finalizes the created type as a generic type description.
|
TypeDescription.Generic |
build(List<? extends Annotation> annotations)
Finalizes the build and finalizes the created type as a generic type description.
|
protected abstract TypeDescription.Generic.Builder |
doAnnotate(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(Class<?> rawType,
List<? extends Type> parameters)
Creates a parameterized type without an owner type or with a non-generic owner type.
|
static TypeDescription.Generic.Builder |
parameterizedType(Class<?> rawType,
Type... parameter)
Creates a parameterized type without an owner type or with a non-generic owner type.
|
static TypeDescription.Generic.Builder |
parameterizedType(Class<?> rawType,
Type ownerType,
List<? extends Type> parameters)
Creates a parameterized type.
|
static TypeDescription.Generic.Builder |
parameterizedType(TypeDescription rawType,
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,
Collection<? extends TypeDefinition> parameters)
Creates a parameterized type.
|
static TypeDescription.Generic.Builder |
rawType(Class<?> type)
Creates a raw type of a type description.
|
static TypeDescription.Generic.Builder |
rawType(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(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(Annotation... annotation)
Creates an unbound wildcard.
|
static TypeDescription.Generic |
unboundWildcard(AnnotationDescription... annotation)
Creates an unbound wildcard.
|
static TypeDescription.Generic |
unboundWildcard(Collection<? extends AnnotationDescription> annotations)
Creates an unbound wildcard.
|
static TypeDescription.Generic |
unboundWildcard(List<? extends Annotation> annotations)
Creates an unbound wildcard.
|
protected final List<? extends AnnotationDescription> annotations
protected Builder(List<? extends AnnotationDescription> annotations)
annotations
- The type annotations of the current annotated type.public static TypeDescription.Generic.Builder rawType(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(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(Annotation... annotation)
annotation
- The type annotations of the unbound wildcard.public static TypeDescription.Generic unboundWildcard(List<? extends 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(Collection<? extends AnnotationDescription> annotations)
annotations
- The type annotations of the unbound wildcard.public static TypeDescription.Generic.Builder typeVariable(String symbol)
symbol
- The symbolic name of the type variable.public static TypeDescription.Generic.Builder parameterizedType(Class<?> rawType, 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(Class<?> rawType, List<? extends 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(Class<?> rawType, Type ownerType, List<? extends 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, 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, 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(Annotation... annotation)
annotation
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic asWildcardUpperBound(List<? extends 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(Collection<? extends AnnotationDescription> annotations)
annotations
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic asWildcardLowerBound()
public TypeDescription.Generic asWildcardLowerBound(Annotation... annotation)
annotation
- Type annotations to be declared by the wildcard type.public TypeDescription.Generic asWildcardLowerBound(List<? extends 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(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(Annotation... annotation)
annotation
- Type annotations to be declared by the current type.public TypeDescription.Generic.Builder annotate(List<? extends 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(Collection<? extends AnnotationDescription> annotations)
annotations
- Type annotations to be declared by the current type.protected abstract TypeDescription.Generic.Builder doAnnotate(List<? extends AnnotationDescription> annotations)
annotations
- Type annotations to be declared by the current type.public TypeDescription.Generic build()
public TypeDescription.Generic build(Annotation... annotation)
annotation
- Type annotations place for the built generic type to declare.public TypeDescription.Generic build(List<? extends 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(Collection<? extends AnnotationDescription> annotations)
annotations
- Type annotations place for the built generic type to declare.protected abstract TypeDescription.Generic doBuild()
Copyright © 2014–2020. All rights reserved.