Package jadex.common.transformation
Interface IStringConverter
public interface IStringConverter
Convert to and from a string.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionconvertObject(Object val, Class<?> type, ClassLoader cl, Object context) Convert an object to a string.convertString(String val, Class<?> type, ClassLoader cl, Object context) Convert a string to an object.getType()Get the type of string that can be processed (xml, json, plain).booleanisSupportedType(Class<?> clazz) Test if the type can be converted.
-
Field Details
-
TYPE_BASIC
- See Also:
-
TYPE_JSON
- See Also:
-
TYPE_XML
- See Also:
-
-
Method Details
-
convertString
Convert a string to an object.- Parameters:
val- The string.type- The target type.context- The context.- Returns:
- The object.
-
convertObject
Convert an object to a string.- Parameters:
val- The object.type- The encoding type.context- The context.- Returns:
- The object.
-
getType
String getType()Get the type of string that can be processed (xml, json, plain).- Returns:
- The object.
-
isSupportedType
Test if the type can be converted.- Parameters:
clazz- The class.- Returns:
- True if can be converted.
-