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 ASTParserParser instance used by class.private LongSerial version UID value (nullif not set). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish(ElementBase binding, IClassHolder holder) Method called after completing code generation for the target class.voidsetSerialVersion(Long version) Set serial version.voidstart(IClassHolder holder) Method called before starting code generation for the target class.voidvalueAdded(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 (nullif 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:
finishin interfaceClassDecorator- Parameters:
binding-holder-
-
start
Method called before starting code generation for the target class.- Specified by:
startin 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:
valueAddedin 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-
-