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 interfaceProcessor.AdvancedFactory<A extends java.lang.annotation.Annotation,T>Provider to, given an annotation instance and the type it's on, create aProcessor.static interfaceProcessor.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 fromCommentannotation on save.static Processor.Factory<Comment,java.lang.Object>localizedComments(java.util.ResourceBundle source)Apply localized comments fromCommentannotation on save.voidprocess(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 fromCommentannotation 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 fromCommentannotation on save.The
comment's valuewill 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
-
-