Interface BeanElementVisitor<A extends Annotation>
- Type Parameters:
A- An annotation type to limit visitation to a subset of beans
- All Superinterfaces:
Ordered, Toggleable
Allows visiting a bean to perform any validation prior to when bean definitions are written out.
- Since:
- 3.0.0
- Author:
- graemerocher
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<BeanElementVisitor<?>> The available visitors.Fields inherited from interface Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptiondefault voidfinish(VisitorContext visitorContext) Called once when visitor processing finishes.default voidstart(VisitorContext visitorContext) Called once when visitor processing starts.default booleansupports(BeanElement beanElement) Returns whether this visitor supports visiting the specified element.@Nullable BeanElementvisitBeanElement(BeanElement beanElement, VisitorContext visitorContext) Visits aBeanElementbefore it is finalized and written to disk, allowing mutation of any annotation metadata before writing the bean definition.Methods inherited from interface Toggleable
isEnabled
-
Field Details
-
VISITORS
The available visitors.
-
-
Method Details
-
visitBeanElement
Visits aBeanElementbefore it is finalized and written to disk, allowing mutation of any annotation metadata before writing the bean definition.- Parameters:
beanElement- The bean elementvisitorContext- The visitor context- Returns:
- The bean element or
nullif the bean should not be written
-
start
Called once when visitor processing starts.- Parameters:
visitorContext- The visitor context
-
finish
Called once when visitor processing finishes.- Parameters:
visitorContext- The visitor context
-
supports
Returns whether this visitor supports visiting the specified element.- Parameters:
beanElement- The bean element- Returns:
- True if it does
-