Package org.jibx.schema.codegen.extend
Class SerializableDecorator
java.lang.Object
org.jibx.schema.codegen.extend.SerializableDecorator
- All Implemented Interfaces:
ClassDecorator
Code generation decorator which adds the
java.lang.Serializable
interface to each class, and optionally
also adds a private static final long serialVersionUID
value.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ASTParser
Parser instance used by class.private Long
Serial version UID value (null
if not set). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
finish
(ElementBase binding, IClassHolder holder) Method called after completing code generation for the target class.void
setSerialVersion
(Long version) Set serial version.void
start
(IClassHolder holder) Method called before starting code generation for the target class.void
valueAdded
(String basename, boolean collect, String type, FieldDeclaration field, MethodDeclaration getmeth, MethodDeclaration setmeth, String descript, IClassHolder holder) Method called after adding each data value to class.
-
Field Details
-
m_parser
private final ASTParser m_parserParser instance used by class. -
m_serialVersion
Serial version UID value (null
if not set).
-
-
Constructor Details
-
SerializableDecorator
public SerializableDecorator()
-
-
Method Details
-
setSerialVersion
Set serial version.- Parameters:
version
-
-
finish
Method called after completing code generation for the target class.- Specified by:
finish
in interfaceClassDecorator
- Parameters:
binding
-holder
-
-
start
Method called before starting code generation for the target class.- Specified by:
start
in interfaceClassDecorator
- Parameters:
holder
-
-
valueAdded
public void valueAdded(String basename, boolean collect, String type, FieldDeclaration field, MethodDeclaration getmeth, MethodDeclaration setmeth, String descript, IClassHolder holder) Method called after adding each data value to class.- Specified by:
valueAdded
in interfaceClassDecorator
- Parameters:
basename
- base name used for data valuecollect
- repeated value flagtype
- value type (item value type, in the case of a repeated value)field
- actual fieldgetmeth
- read access methodsetmeth
- write access methoddescript
- value description textholder
-
-