java.lang.Object
tools.jackson.databind.util.NameTransformer
- Direct Known Subclasses:
NameTransformer.Chained,NameTransformer.NopTransformer
Helper class used to encapsulate details of name mangling, transforming
of names using different strategies (prefixes, suffixes).
Default implementation is "no-operation" (aka identity transformation).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NameTransformerSingleton "no-operation" transformer which simply returns given name as is. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NameTransformerMethod that constructs transformer that applies given transformers as a sequence; essentially combines separate transform operations into one logical transformation.abstract StringMethod called when reversal of transformation is needed; should return null if this is not possible, that is, given name cannot have been result of callingtransform(java.lang.String)of this object.static NameTransformersimpleTransformer(String prefix, String suffix) Factory method for constructing a simple transformer based on prefix and/or suffix.abstract StringMethod called when (forward) transformation is needed.
-
Field Details
-
NOP
Singleton "no-operation" transformer which simply returns given name as is. Used commonly as placeholder or marker.
-
-
Constructor Details
-
NameTransformer
protected NameTransformer()
-
-
Method Details
-
simpleTransformer
Factory method for constructing a simple transformer based on prefix and/or suffix. -
chainedTransformer
Method that constructs transformer that applies given transformers as a sequence; essentially combines separate transform operations into one logical transformation. -
transform
Method called when (forward) transformation is needed. -
reverse
Method called when reversal of transformation is needed; should return null if this is not possible, that is, given name cannot have been result of callingtransform(java.lang.String)of this object.
-