Class ObjectToObjectConverter
java.lang.Object
org.jolokia.service.serializer.object.ObjectToObjectConverter
Converter from some object representation to desired target type. This converter accepts not only String values and doesn't change the value if it's already of the target type.
This converted no longer calls Object.toString() as in Jolokia 1.x.
Internally this class uses parser abstractions for several built-in types.
- Since:
- Jun 11, 2009
- Author:
- roland
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvert value from either a given object or its string representation.voidsetJolokiaContext(org.jolokia.server.core.service.api.JolokiaContext pJolokiaContext) When this converter is configured withJolokiaContext, we can get configuration of some conversion-related properties like date format.voidsetStringConverters(Map<Class<?>, ObjectAccessor> stringConverters) We can configurestringConvertersfor discoverable String serialization for custom (and some built-in) types
-
Constructor Details
-
ObjectToObjectConverter
public ObjectToObjectConverter()
-
-
Method Details
-
setJolokiaContext
public void setJolokiaContext(org.jolokia.server.core.service.api.JolokiaContext pJolokiaContext) When this converter is configured withJolokiaContext, we can get configuration of some conversion-related properties like date format.- Parameters:
pJolokiaContext-
-
setStringConverters
We can configurestringConvertersfor discoverable String serialization for custom (and some built-in) types- Parameters:
stringConverters-
-
convert
Convert value from either a given object or its string representation. If the value is already assignable to the given class name it is returned directly.
-