public abstract class ClassesSerializableTest extends Object
getExcludedPatterns(), getBasePackages(),
getJarPattern()| Constructor and Description |
|---|
ClassesSerializableTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
classesSerializable()
Tests that all the relevant classes and interfaces under
getBasePackages() implement Serializable. |
protected Stream<String> |
getBasePackages() |
protected Stream<String> |
getExcludedPatterns() |
protected Pattern |
getJarPattern()
JARs that will be scanned for classes to test, in addition to classpath
directories.
|
protected boolean |
isTestClassPath(String classPath) |
protected void |
resetThreadLocals()
The method is called right after a class instantiation and might be
overriden by subclasses to reset thread local values (ex.
|
<T> T |
serializeAndDeserialize(T instance)
Performs actual serialization/deserialization
|
protected void |
setupThreadLocals()
The method is called right a class instantiation and might be overriden
by subclasses to install some necessary thread local values (ex.
|
protected boolean isTestClassPath(String classPath)
public <T> T serializeAndDeserialize(T instance)
throws Throwable
T - the type of the instanceinstance - the instanceThrowable - if something goes wrong.protected void resetThreadLocals()
setupThreadLocals()protected void setupThreadLocals()
resetThreadLocals()protected Pattern getJarPattern()
public void classesSerializable()
throws Throwable
getBasePackages() implement Serializable.Throwable - serialization goes wrongCopyright © 2000–2019 Vaadin Ltd. All rights reserved.