Package javassist
Class SerialVersionUID
java.lang.Object
javassist.SerialVersionUID
Utility for calculating serialVersionUIDs for Serializable classes.
- Author:
- Bob Lee (crazybob@crazybob.org), modified by Shigeru Chiba
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
calculateDefault
(CtClass clazz) Calculate default value.static void
setSerialVersionUID
(CtClass clazz) Adds serialVersionUID if one does not already exist.
-
Constructor Details
-
SerialVersionUID
public SerialVersionUID()
-
-
Method Details
-
setSerialVersionUID
public static void setSerialVersionUID(CtClass clazz) throws CannotCompileException, NotFoundException Adds serialVersionUID if one does not already exist. Call this before modifying a class to maintain serialization compatability. -
calculateDefault
Calculate default value. See Java Serialization Specification, Stream Unique Identifiers.- Throws:
CannotCompileException
- Since:
- 3.20
-