Interface Processor<V>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Performs a transformation on a value annotated with a specific type.
- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Processor.Factory<A extends Annotation,
T> Provider to, given an annotation instance and the type it's on, create aProcessor
. -
Method Summary
Modifier and TypeMethodDescriptionstatic Processor.Factory<Comment,
Object> comments()
Apply comments fromComment
annotation on save.static Processor.Factory<Comment,
Object> localizedComments
(ResourceBundle source) Apply localized comments fromComment
annotation on save.void
process
(V value, ConfigurationNode destination) Transform the output node on write.
-
Method Details
-
process
Transform the output node on write.- Parameters:
value
- source valuedestination
- destination node- Since:
- 4.0.0
-
comments
Apply comments fromComment
annotation on save.- Returns:
- a new processor factory
- Since:
- 4.0.0
-
localizedComments
Apply localized comments fromComment
annotation on save.The
comment's value
will be treated as a key intosource
, resolved to the system default locale. Missing keys will be written literally to node.- Parameters:
source
- source bundle for comments- Returns:
- a new processor factory
- Since:
- 4.0.0
-