Constructor and Description |
---|
Serial() |
Modifier and Type | Method and Description |
---|---|
static <T extends Serializable> |
assertTransientFieldsInitialized(T obj,
String... excludedFields)
Check that transient fields are properly initialized after the object has been serialized and deserialized.
|
static <T extends Serializable> |
serial(T input_object)
Serializes an Object, deserializes it, and then returns it.
|
public Serial()
public static <T extends Serializable> T serial(T input_object) throws IOException, ClassNotFoundException
input_object
- IOException
ClassNotFoundException
public static <T extends Serializable> void assertTransientFieldsInitialized(T obj, String... excludedFields) throws IOException, ClassNotFoundException, IllegalAccessException
obj
- A Serializable object to test.excludedFields
- Names of fields that we do not care are not initialized after deserialization. Could be
integers that are properly initialized to 0 or the like. Only include fields here if you are sure that
initialization is not required!IOException
ClassNotFoundException
IllegalAccessException
Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.