Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.databind.util

public abstract Class NameTransformer

extends Object
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.databind.util.NameTransformer.NopTransformer, com.fasterxml.jackson.databind.util.NameTransformer.Chained

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class
protected static class

Field Summary

Modifier and TypeField and Description
public static final NameTransformer
NOP

Singleton "no-operation" transformer which simply returns given name as is.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static NameTransformer
chainedTransformer(NameTransformer t1, NameTransformer t2)

Method that constructs transformer that applies given transformers as a sequence; essentially combines separate transform operations into one logical transformation.

public abstract String
reverse(String transformed)

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 calling transform of this object.

public static NameTransformer
simpleTransformer(final String prefix, final String suffix)

Factory method for constructing a simple transformer based on prefix and/or suffix.

public abstract String
transform(String name)

Method called when (forward) transformation is needed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

NOPback to summary
public static final NameTransformer NOP

Singleton "no-operation" transformer which simply returns given name as is. Used commonly as placeholder or marker.

Constructor Detail

NameTransformerback to summary
protected NameTransformer()

Method Detail

chainedTransformerback to summary
public static NameTransformer chainedTransformer(NameTransformer t1, NameTransformer t2)

Method that constructs transformer that applies given transformers as a sequence; essentially combines separate transform operations into one logical transformation.

reverseback to summary
public abstract String reverse(String transformed)

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 calling transform of this object.

simpleTransformerback to summary
public static NameTransformer simpleTransformer(final String prefix, final String suffix)

Factory method for constructing a simple transformer based on prefix and/or suffix.

transformback to summary
public abstract String transform(String name)

Method called when (forward) transformation is needed.

com.fasterxml.jackson.databind.util back to summary

public Class NameTransformer.Chained

extends NameTransformer
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Field Summary

Modifier and TypeField and Description
protected final NameTransformer
protected final NameTransformer
private static final long
Inherited from com.fasterxml.jackson.databind.util.NameTransformer:
NOP

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
reverse(String transformed)

Implements abstract com.fasterxml.jackson.databind.util.NameTransformer.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 calling transform of this object.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public String
transform(String name)

Implements abstract com.fasterxml.jackson.databind.util.NameTransformer.transform.

Method called when (forward) transformation is needed.
Inherited from com.fasterxml.jackson.databind.util.NameTransformer:
chainedTransformersimpleTransformer

Field Detail

_t1back to summary
protected final NameTransformer _t1
_t2back to summary
protected final NameTransformer _t2
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

Chainedback to summary
public Chained(NameTransformer t1, NameTransformer t2)

Method Detail

reverseback to summary
public String reverse(String transformed)

Implements abstract com.fasterxml.jackson.databind.util.NameTransformer.reverse.

Doc from com.fasterxml.jackson.databind.util.NameTransformer.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 calling transform of this object.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
transformback to summary
public String transform(String name)

Implements abstract com.fasterxml.jackson.databind.util.NameTransformer.transform.

Doc from com.fasterxml.jackson.databind.util.NameTransformer.transform.

Method called when (forward) transformation is needed.

Annotations
@Override
com.fasterxml.jackson.databind.util back to summary

protected final Class NameTransformer.NopTransformer

extends NameTransformer
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.databind.util.NameTransformer:
NOP

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public String
reverse(String transformed)

Implements abstract com.fasterxml.jackson.databind.util.NameTransformer.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 calling transform of this object.
public String
transform(String name)

Implements abstract com.fasterxml.jackson.databind.util.NameTransformer.transform.

Method called when (forward) transformation is needed.
Inherited from com.fasterxml.jackson.databind.util.NameTransformer:
chainedTransformersimpleTransformer

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

NopTransformerback to summary
protected NopTransformer()

Method Detail

reverseback to summary
public String reverse(String transformed)

Implements abstract com.fasterxml.jackson.databind.util.NameTransformer.reverse.

Doc from com.fasterxml.jackson.databind.util.NameTransformer.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 calling transform of this object.

Annotations
@Override
transformback to summary
public String transform(String name)

Implements abstract com.fasterxml.jackson.databind.util.NameTransformer.transform.

Doc from com.fasterxml.jackson.databind.util.NameTransformer.transform.

Method called when (forward) transformation is needed.

Annotations
@Override