T - the class represented by the configured AnnotatedTypepublic interface AnnotatedTypeConfigurator<T>
This API is a helper to configure a new AnnotatedType instance. The container must provide an implementation of
this interface.
AnnotatedTypeConfigurator is not reusable.
This configurator is not thread safe and shall not be used concurrently.
| Modifier and Type | Method and Description |
|---|---|
AnnotatedTypeConfigurator<T> |
add(java.lang.annotation.Annotation annotation)
Add an annotation to the type.
|
java.util.Set<AnnotatedConstructorConfigurator<T>> |
constructors() |
java.util.Set<AnnotatedFieldConfigurator<? super T>> |
fields() |
default java.util.stream.Stream<AnnotatedConstructorConfigurator<T>> |
filterConstructors(java.util.function.Predicate<AnnotatedConstructor<T>> predicate) |
default java.util.stream.Stream<AnnotatedFieldConfigurator<? super T>> |
filterFields(java.util.function.Predicate<AnnotatedField<? super T>> predicate) |
default java.util.stream.Stream<AnnotatedMethodConfigurator<? super T>> |
filterMethods(java.util.function.Predicate<AnnotatedMethod<? super T>> predicate) |
AnnotatedType<T> |
getAnnotated() |
java.util.Set<AnnotatedMethodConfigurator<? super T>> |
methods() |
AnnotatedTypeConfigurator<T> |
remove(java.util.function.Predicate<java.lang.annotation.Annotation> predicate)
Remove annotations that match the specified predicate.
|
default AnnotatedTypeConfigurator<T> |
removeAll()
Remove all the annotations.
|
AnnotatedType<T> getAnnotated()
AnnotatedTypeAnnotatedTypeConfigurator<T> add(java.lang.annotation.Annotation annotation)
annotation - the annotation to addAnnotatedTypeConfigurator<T> remove(java.util.function.Predicate<java.lang.annotation.Annotation> predicate)
Example predicates:
// To remove all the annotations:
(a) -> true
// To remove annotations with a concrete annotation type:
(a) -> a.annotationType().equals(Foo.class)
// To remove annotation equal to a specified object:
(a) -> a.equals(fooAnnotation)
// To remove annotations that are considered equivalent for the purposes of typesafe resolution:
(a) -> beanManager.areQualifiersEquivalent(a, fooQualifier)
(a) -> beanManager.areInterceptorBindingsEquivalent(a, fooInterceptorBinding)
predicate - Predicate used to filter annotations to removedefault AnnotatedTypeConfigurator<T> removeAll()
java.util.Set<AnnotatedMethodConfigurator<? super T>> methods()
AnnotatedMethodConfigurators reflecting the AnnotatedType.getMethods()default java.util.stream.Stream<AnnotatedMethodConfigurator<? super T>> filterMethods(java.util.function.Predicate<AnnotatedMethod<? super T>> predicate)
predicate - Testing the original AnnotatedMethodAnnotatedMethodConfigurators matching the given predicateAnnotatedMethodConfigurator.getAnnotated()java.util.Set<AnnotatedFieldConfigurator<? super T>> fields()
AnnotatedFieldConfigurators reflecting the AnnotatedType.getFields()default java.util.stream.Stream<AnnotatedFieldConfigurator<? super T>> filterFields(java.util.function.Predicate<AnnotatedField<? super T>> predicate)
predicate - Testing the original AnnotatedFieldAnnotatedFieldConfigurators matching the given predicateAnnotatedFieldConfigurator.getAnnotated()java.util.Set<AnnotatedConstructorConfigurator<T>> constructors()
AnnotatedConstructorConfigurators reflecting the
AnnotatedType.getConstructors()default java.util.stream.Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(java.util.function.Predicate<AnnotatedConstructor<T>> predicate)
predicate - Testing the original AnnotatedConstructorAnnotatedConstructorConfigurators matching the given predicateAnnotatedConstructorConfigurator.getAnnotated()