Class StringToObjectConverter

java.lang.Object
org.jolokia.service.serializer.object.StringToObjectConverter

public class StringToObjectConverter extends Object
Converter from a string representation to its Java object form
Since:
Jun 11, 2009
Author:
roland
  • Constructor Details

    • StringToObjectConverter

      public StringToObjectConverter()
  • Method Details

    • deserialize

      public Object deserialize(String pExpectedClassName, Object pValue)
      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 type
      pValue - value to either take directly or to convert from its string representation.
      Returns:
      the converted object which is of type pExpectedClassName
    • convertFromString

      public Object convertFromString(String pType, String pValue)
      Deserialize a string representation to an object for a given type
      Parameters:
      pType - type to convert to
      pValue - the value to convert from
      Returns:
      the converted value