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 GeneratorExtension
public Collection extraSpecificImports()
extraSpecificImports
in interface GeneratorExtension
public Collection extraInterfaceNames()
extraInterfaceNames
in interface GeneratorExtension
public void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException
generate
in interface GeneratorExtension
IOException
protected void writeStoreObject(Property prop, Class propType, IndentedWriter iw) throws IOException
IOException
protected void writeUnstoreObject(Property prop, Class propType, IndentedWriter iw) throws IOException
IOException
protected void generateExtraSerWriteStatements(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException
IOException
protected void generateExtraSerInitializers(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException
IOException
Copyright © 2018 com.mchange. All rights reserved.