public class SerializableExtension extends Object implements GeneratorExtension
| Constructor and Description |
|---|
SerializableExtension() |
SerializableExtension(Set transientProperties,
Map transientPropertyInitializers) |
| Modifier and Type | Method and Description |
|---|---|
Collection |
extraGeneralImports() |
Collection |
extraInterfaceNames() |
Collection |
extraSpecificImports() |
void |
generate(ClassInfo info,
Class superclassType,
Property[] props,
Class[] propTypes,
IndentedWriter iw) |
protected void |
generateExtraSerInitializers(ClassInfo info,
Class superclassType,
Property[] props,
Class[] propTypes,
IndentedWriter iw) |
protected void |
generateExtraSerWriteStatements(ClassInfo info,
Class superclassType,
Property[] props,
Class[] propTypes,
IndentedWriter iw) |
protected void |
writeStoreObject(Property prop,
Class propType,
IndentedWriter iw) |
protected void |
writeUnstoreObject(Property prop,
Class propType,
IndentedWriter iw) |
public SerializableExtension(Set transientProperties, Map transientPropertyInitializers)
transientProperties - a set of Strings, the names of all properties that should be considered transient and not serializedtransientPropertyInitializers - an optional Map of a subset of the transient property names to non-default initialization
expressions, which should be unterminated expressions, and which will be used verbatim in
the generated code.public SerializableExtension()
public Collection extraGeneralImports()
extraGeneralImports in interface GeneratorExtensionpublic Collection extraSpecificImports()
extraSpecificImports in interface GeneratorExtensionpublic Collection extraInterfaceNames()
extraInterfaceNames in interface GeneratorExtensionpublic void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException
generate in interface GeneratorExtensionIOExceptionprotected void writeStoreObject(Property prop, Class propType, IndentedWriter iw) throws IOException
IOExceptionprotected void writeUnstoreObject(Property prop, Class propType, IndentedWriter iw) throws IOException
IOExceptionprotected void generateExtraSerWriteStatements(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException
IOExceptionprotected void generateExtraSerInitializers(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException
IOException