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.
@FunctionalInterface public interface Processor<V>
Performs a transformation on a value annotated with a specific type.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Processor.Factory<A extends java.lang.annotation.Annotation,T>
Provider to, given an annotation instance and the type it's on, create aProcessor
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Processor.Factory<Comment,java.lang.Object>
comments()
Apply comments fromComment
annotation on save.static Processor.Factory<Comment,java.lang.Object>
localizedComments(java.util.ResourceBundle source)
Apply localized comments fromComment
annotation on save.void
process(V value, ConfigurationNode destination)
Transform the output node on write.
-
-
-
Method Detail
-
process
void process(V value, ConfigurationNode destination)
Transform the output node on write.- Parameters:
value
- source valuedestination
- destination node- Since:
- 4.0.0
-
comments
static Processor.Factory<Comment,java.lang.Object> comments()
Apply comments fromComment
annotation on save.- Returns:
- a new processor factory
- Since:
- 4.0.0
-
localizedComments
static Processor.Factory<Comment,java.lang.Object> localizedComments(java.util.ResourceBundle source)
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
-
-