T - the class represented by the configured AnnotatedTypepublic interface AnnotatedTypeConfigurator<T>
AnnotatedType instance.
The CDI container must provides an implementation of this interface.
AnnotatedTypeConfigurator is not reusable.
This configurator is not thread safe and shall not be used concurrently.BeforeBeanDiscovery.addAnnotatedType(String),
AfterTypeDiscovery.addAnnotatedType(String),
ProcessAnnotatedType.configureAnnotatedType()| Modifier and Type | Method and Description |
|---|---|
AnnotatedTypeConfigurator<T> |
addToConstructor(AnnotatedConstructor<T> constructor,
Annotation annotation)
Add an annotation to the specified constructor.
|
AnnotatedTypeConfigurator<T> |
addToConstructor(Constructor<T> constructor,
Annotation annotation)
Add an annotation to the specified constructor.
|
AnnotatedTypeConfigurator<T> |
addToConstructorParameter(Constructor<T> constructor,
int position,
Annotation annotation)
Add an annotation to the specified constructor parameter.
|
AnnotatedTypeConfigurator<T> |
addToField(AnnotatedField<? super T> field,
Annotation annotation)
Add an annotation to the specified field.
|
AnnotatedTypeConfigurator<T> |
addToField(Field field,
Annotation annotation)
Add an annotation to the specified field.
|
AnnotatedTypeConfigurator<T> |
addToMethod(AnnotatedMethod<? super T> method,
Annotation annotation)
Add an annotation to the specified method.
|
AnnotatedTypeConfigurator<T> |
addToMethod(Method method,
Annotation annotation)
Add an annotation to the specified method.
|
AnnotatedTypeConfigurator<T> |
addToMethodParameter(Method method,
int position,
Annotation annotation)
Add an annotation to the specified method parameter.
|
AnnotatedTypeConfigurator<T> |
addToParameter(AnnotatedParameter<? super T> parameter,
Annotation annotation)
Add an annotation to the specified parameter.
|
AnnotatedTypeConfigurator<T> |
addToType(Annotation annotation)
Add an annotation to the type declaration.
|
Class<T> |
getJavaClass()
getter for the class represented by the AnnotatedType to configure
|
AnnotatedTypeConfigurator<T> |
overrideConstructorParameterType(Constructor<T> constructor,
int position,
Type type)
Override the declared type of a constructor parameter
|
AnnotatedTypeConfigurator<T> |
overrideFieldType(AnnotatedField<? super T> field,
Type type)
Override the declared type of a field
|
AnnotatedTypeConfigurator<T> |
overrideFieldType(Field field,
Type type)
Override the declared type of a field
|
AnnotatedTypeConfigurator<T> |
overrideMethodParameterType(Method method,
int position,
Type type)
Override the declared type of a method parameter
|
AnnotatedTypeConfigurator<T> |
overrideParameterType(AnnotatedParameter<? super T> parameter,
Type type)
Override the declared type of a parameter.
|
<U extends T> |
read(AnnotatedType<U> type)
Reads in from an existing AnnotatedType.
|
<U extends T> |
read(AnnotatedType<U> type,
boolean overwrite)
Reads in from an existing AnnotatedType.
|
<U extends T> |
read(Class<U> type)
Reads the annotations from an existing java type.
|
<U extends T> |
read(Class<U> type,
boolean overwrite)
Reads the annotations from an existing java type.
|
AnnotatedTypeConfigurator<T> |
removeFromAll(Annotation annotation)
Remove the provided annotation from the type, and all of it's members.
|
AnnotatedTypeConfigurator<T> |
removeFromAll(Class<? extends Annotation> annotationType)
Remove annotations from the type, and all of it's members.
|
AnnotatedTypeConfigurator<T> |
removeFromConstructor(AnnotatedConstructor<T> constructor,
Class<? extends Annotation> annotationType)
Remove an annotation from the specified constructor.
|
AnnotatedTypeConfigurator<T> |
removeFromConstructor(Constructor<T> constructor,
Class<? extends Annotation> annotationType)
Remove an annotation from the specified constructor.
|
AnnotatedTypeConfigurator<T> |
removeFromConstructorParameter(Constructor<T> constructor,
int position,
Class<? extends Annotation> annotationType)
Remove an annotation from the specified constructor parameter.
|
AnnotatedTypeConfigurator<T> |
removeFromField(AnnotatedField<? super T> field,
Class<? extends Annotation> annotationType)
Remove an annotation from the specified field.
|
AnnotatedTypeConfigurator<T> |
removeFromField(Field field,
Class<? extends Annotation> annotationType)
Remove an annotation from the specified field.
|
AnnotatedTypeConfigurator<T> |
removeFromMethod(AnnotatedMethod<? super T> method,
Class<? extends Annotation> annotationType)
Remove an annotation from the specified method.
|
AnnotatedTypeConfigurator<T> |
removeFromMethod(Method method,
Class<? extends Annotation> annotationType)
Remove an annotation from the specified method.
|
AnnotatedTypeConfigurator<T> |
removeFromMethodParameter(Method method,
int position,
Class<? extends Annotation> annotationType)
Remove an annotation from the specified method parameter.
|
AnnotatedTypeConfigurator<T> |
removeFromParameter(AnnotatedParameter<? super T> parameter,
Class<? extends Annotation> annotationType)
Remove an annotation from the specified parameter.
|
AnnotatedTypeConfigurator<T> |
removeFromType(Annotation annotation)
Remove an annotation instance from the type
|
AnnotatedTypeConfigurator<T> |
removeFromType(Class<? extends Annotation> annotationType)
Remove an annotation class from the type
|
AnnotatedTypeConfigurator<T> |
setType(Class<T> type)
set the class represented by the AnnotatedType to configure
|
AnnotatedTypeConfigurator<T> addToType(Annotation annotation)
annotation - the annotation instance to addIllegalArgumentException - if the annotation is nullAnnotatedTypeConfigurator<T> removeFromType(Class<? extends Annotation> annotationType)
annotationType - the annotation type to removeIllegalArgumentException - if the annotationType is nullAnnotatedTypeConfigurator<T> removeFromType(Annotation annotation)
annotation - the annotation to removeIllegalArgumentException - if the annotation is nullAnnotatedTypeConfigurator<T> addToField(Field field, Annotation annotation)
field - the field to add the annotation toannotation - the annotation to addIllegalArgumentException - if the annotation is nullAnnotatedTypeConfigurator<T> addToField(AnnotatedField<? super T> field, Annotation annotation)
field - the field to add the annotation toannotation - the annotation to addIllegalArgumentException - if the annotation is nullAnnotatedTypeConfigurator<T> removeFromField(Field field, Class<? extends Annotation> annotationType)
field - the field to remove the annotation fromannotationType - the annotation type to removeIllegalArgumentException - if the annotationType is null or if the
field is not currently declared on the typeAnnotatedTypeConfigurator<T> removeFromField(AnnotatedField<? super T> field, Class<? extends Annotation> annotationType)
field - the field to remove the annotation fromannotationType - the annotation type to removeIllegalArgumentException - if the annotationType is null or if the
field is not currently declared on the typeAnnotatedTypeConfigurator<T> addToMethod(Method method, Annotation annotation)
method - the method to add the annotation toannotation - the annotation to addIllegalArgumentException - if the annotation is nullAnnotatedTypeConfigurator<T> addToMethod(AnnotatedMethod<? super T> method, Annotation annotation)
method - the method to add the annotation toannotation - the annotation to addIllegalArgumentException - if the annotation is nullAnnotatedTypeConfigurator<T> removeFromMethod(Method method, Class<? extends Annotation> annotationType)
method - the method to remove the annotation fromannotationType - the annotation type to removeIllegalArgumentException - if the annotationType is null or if the
method is not currently declared on the typeAnnotatedTypeConfigurator<T> removeFromMethod(AnnotatedMethod<? super T> method, Class<? extends Annotation> annotationType)
method - the method to remove the annotation fromannotationType - the annotation type to removeIllegalArgumentException - if the annotationType is null or if the
method is not currently declared on the typeAnnotatedTypeConfigurator<T> addToMethodParameter(Method method, int position, Annotation annotation)
method - the method to add the annotation toposition - the position of the parameter to addannotation - the annotation to addIllegalArgumentException - if the annotation is nullAnnotatedTypeConfigurator<T> removeFromMethodParameter(Method method, int position, Class<? extends Annotation> annotationType)
method - the method to remove the annotation fromposition - the position of the parameter to removeannotationType - the annotation type to removeIllegalArgumentException - if the annotationType is null, if the
method is not currently declared on the type or if the
parameter is not declared on the methodAnnotatedTypeConfigurator<T> addToConstructor(Constructor<T> constructor, Annotation annotation)
constructor - the constructor to add the annotation toannotation - the annotation to addIllegalArgumentException - if the annotation is nullAnnotatedTypeConfigurator<T> addToConstructor(AnnotatedConstructor<T> constructor, Annotation annotation)
constructor - the constructor to add the annotation toannotation - the annotation to addIllegalArgumentException - if the annotation is nullAnnotatedTypeConfigurator<T> removeFromConstructor(Constructor<T> constructor, Class<? extends Annotation> annotationType)
constructor - the constructor to add the annotation toannotationType - the annotation to addIllegalArgumentException - if the annotationType is null or if the
constructor is not currently declared on the typeAnnotatedTypeConfigurator<T> removeFromConstructor(AnnotatedConstructor<T> constructor, Class<? extends Annotation> annotationType)
constructor - the constructor to add the annotation toannotationType - the annotation to addIllegalArgumentException - if the annotationType is null, if the
annotation does not exist on the type or if the constructor is
not currently declared on the typeAnnotatedTypeConfigurator<T> addToConstructorParameter(Constructor<T> constructor, int position, Annotation annotation)
constructor - the constructor to add the annotation toposition - the position of the parameter to addannotation - the annotation to addIllegalArgumentException - if the annotation is nullAnnotatedTypeConfigurator<T> removeFromConstructorParameter(Constructor<T> constructor, int position, Class<? extends Annotation> annotationType)
constructor - the constructor to remove the annotation fromposition - the position of the parameter to removeannotationType - the annotation type to removeIllegalArgumentException - if the annotationType is null, if the
constructor is not currently declared on the type or if the
parameter is not declared on the constructorAnnotatedTypeConfigurator<T> removeFromParameter(AnnotatedParameter<? super T> parameter, Class<? extends Annotation> annotationType)
parameter - the parameter to remove the annotation fromannotationType - the annotation type to removeIllegalArgumentException - if the annotationType is null, if the
callable which declares the parameter is not currently declared
on the type or if the parameter is not declared on either a
constructor or a methodAnnotatedTypeConfigurator<T> addToParameter(AnnotatedParameter<? super T> parameter, Annotation annotation)
parameter - the parameter to add the annotation toannotation - the annotation to addIllegalArgumentException - if the annotation is null or if the
parameter is not declared on either a constructor or a methodAnnotatedTypeConfigurator<T> removeFromAll(Class<? extends Annotation> annotationType)
annotationType - the type of annotation to removeIllegalArgumentException - if the annotationType is nullAnnotatedTypeConfigurator<T> removeFromAll(Annotation annotation)
annotation - the annotation to removeIllegalArgumentException - if the annotation is null<U extends T> AnnotatedTypeConfigurator<T> read(AnnotatedType<U> type)
type - the type to read fromIllegalArgumentException - if type is null<U extends T> AnnotatedTypeConfigurator<T> read(AnnotatedType<U> type, boolean overwrite)
type - the type to read fromoverwrite - if true, the read annotation will replace any existing
annotationIllegalArgumentException - if type is null<U extends T> AnnotatedTypeConfigurator<T> read(Class<U> type)
type - the type to read fromIllegalArgumentException - if type is null<U extends T> AnnotatedTypeConfigurator<T> read(Class<U> type, boolean overwrite)
type - the type to read fromoverwrite - if true, the read annotation will replace any existing
annotationAnnotatedTypeConfigurator<T> overrideFieldType(Field field, Type type)
field - the field to override the type ontype - the new type of the fieldIllegalArgumentException - if field or type is nullAnnotatedTypeConfigurator<T> overrideFieldType(AnnotatedField<? super T> field, Type type)
field - the field to override the type ontype - the new type of the fieldIllegalArgumentException - if field or type is nullAnnotatedTypeConfigurator<T> overrideMethodParameterType(Method method, int position, Type type)
method - the method to override the parameter type onposition - the position of the parameter to override the type ontype - the new type of the parameterIllegalArgumentException - if parameter or type is nullAnnotatedTypeConfigurator<T> overrideConstructorParameterType(Constructor<T> constructor, int position, Type type)
constructor - the constructor to override the parameter type onposition - the position of the parameter to override the type ontype - the new type of the parameterIllegalArgumentException - if parameter or type is nullAnnotatedTypeConfigurator<T> overrideParameterType(AnnotatedParameter<? super T> parameter, Type type)
parameter - the parameter to override the type ontype - the new type of the parameterIllegalArgumentException - if parameter or type is nullClass<T> getJavaClass()
AnnotatedTypeConfigurator<T> setType(Class<T> type)
type - the Class represented by the AnnotatedTypeCopyright © 2008-2016 JBoss by Red Hat, Inc.. All Rights Reserved.