added support for deserializing a java class