Interface ComponentDescriptorModifierResolver
-
- All Known Implementing Classes:
ComponentDescriptorModifierResolver.ApplyModifierOnAnnotationExist
,ComponentDescriptorModifierResolver.ApplyModifierOnAnnotations
public interface ComponentDescriptorModifierResolver
This interface can be used to resolve aComponentDescriptorModifier
to be used for registering a component.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ComponentDescriptorModifierResolver.ApplyModifierOnAnnotationExist
static class
ComponentDescriptorModifierResolver.ApplyModifierOnAnnotations<T extends Annotation>
-
Method Summary
-
-
-
Method Detail
-
resolves
Optional<ComponentDescriptorModifier> resolves(Class<?> clazz)
Resolves theComponentDescriptorModifier
for the given component type.- Parameters:
clazz
- theClass
that defines the component.- Returns:
- an optional
ComponentDescriptorModifier
.
-
resolves
Optional<ComponentDescriptorModifier> resolves(Method method)
Resolves theComponentDescriptorModifier
for the given component type.- Parameters:
method
- theMethod
that defines the component.- Returns:
- an optional
ComponentDescriptorModifier
.
-
onAnnotationExists
static ComponentDescriptorModifierResolver onAnnotationExists(Class<? extends Annotation> annotationType, ComponentDescriptorModifier modifier)
Returns the givenComponentDescriptorModifier
only if the component is annotated with the given component.- Parameters:
annotationType
- theAnnotation
type to check.modifier
- theComponentDescriptorModifier
to add.
-
onAnnotations
static <T extends Annotation> ComponentDescriptorModifierResolver onAnnotations(Class<T> annotationType, Function<List<T>,ComponentDescriptorModifier> modifier)
Returns the givenComponentDescriptorModifier
only if the component is annotated with the given component.- Parameters:
annotationType
- theAnnotation
type to check.modifier
- theComponentDescriptorModifier
to add.
-
onSingleAnnotation
static <T extends Annotation> ComponentDescriptorModifierResolver onSingleAnnotation(Class<T> annotationType, Function<T,ComponentDescriptorModifier> modifier)
Returns the givenComponentDescriptorModifier
only if the component is annotated with the given component.- Parameters:
annotationType
- theAnnotation
type to check.modifier
- theComponentDescriptorModifier
to add.
-
-