public class StringifierRegistryImpl extends Object implements StringifierRegistry
| Modifier and Type | Field and Description |
|---|---|
static StringifierRegistry |
DEFAULT |
| Constructor and Description |
|---|
StringifierRegistryImpl()
Create a new registry with no next registry.
|
StringifierRegistryImpl(StringifierRegistry registry)
Create a new registry which is chained to an existing registry.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Class<?> theClass,
Stringifier stringifier)
Add a mapping from a Class to a Stringifier
|
Stringifier |
lookup(Class<?> theClass)
Lookup a Stringifier from a Class.
|
public static final StringifierRegistry DEFAULT
public StringifierRegistryImpl()
public StringifierRegistryImpl(StringifierRegistry registry)
registry - the registry to use if this registry fails to find a Stringifierpublic void add(Class<?> theClass, Stringifier stringifier)
StringifierRegistryadd in interface StringifierRegistrytheClass - the Class to which the Stringifier should be associatedstringifier - the Stringifier for the classpublic Stringifier lookup(Class<?> theClass)
StringifierRegistrylookup in interface StringifierRegistrytheClass - the ClassCopyright © 2019. All rights reserved.