Class 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 Detail

      • deserialize

        public static Class<?> deserialize​(String str)
        Deserialize a string, previously produced by serialize(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)