Class StringToObjectConverter
java.lang.Object
org.jolokia.service.serializer.object.StringToObjectConverter
Converter from a string representation to its Java object form
- Since:
- Jun 11, 2009
- Author:
- roland
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertFromString(String pType, String pValue) Deserialize a string representation to an object for a given typedeserialize(String pExpectedClassName, Object pValue) Convert value from either a given object or its string representation.
-
Constructor Details
-
StringToObjectConverter
public StringToObjectConverter()
-
-
Method Details
-
deserialize
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.- Parameters:
pExpectedClassName- type name of the expected typepValue- value to either take directly or to convert from its string representation.- Returns:
- the converted object which is of type
pExpectedClassName
-
convertFromString
Deserialize a string representation to an object for a given type- Parameters:
pType- type to convert topValue- the value to convert from- Returns:
- the converted value
-