- java.lang.Object
-
- com.pervasive.datarush.json.ClassSerializer
-
public final class ClassSerializer extends Object
Utility that should be used for all json-related class serialization. Currently this first looks to the context classloader, then checks the classloader that was used for datarush. In the future, this may be made extensible.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<?>
deserialize(String str)
Deserialize a string, previously produced byserialize(Class)
.static String
serialize(Class<?> clazz)
Serialize a class as a string.
-
-
-
Method Detail
-
deserialize
public static Class<?> deserialize(String str)
Deserialize a string, previously produced byserialize(Class)
.- Parameters:
str
- the string to deserialize- Returns:
- the class object
- Throws:
IllegalArgumentException
- if the class cannot be resolved
-
serialize
public static String serialize(Class<?> clazz)
Serialize a class as a string.- Parameters:
clazz
- the class- Returns:
- a string that can be deserialized via
deserialize(String)
-
-