public class SerializableExtension extends java.lang.Object implements GeneratorExtension
Constructor and Description |
---|
SerializableExtension() |
SerializableExtension(java.util.Set transientProperties,
java.util.Map transientPropertyInitializers) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection |
extraGeneralImports() |
java.util.Collection |
extraInterfaceNames() |
java.util.Collection |
extraSpecificImports() |
void |
generate(ClassInfo info,
java.lang.Class superclassType,
Property[] props,
java.lang.Class[] propTypes,
IndentedWriter iw) |
protected void |
generateExtraSerInitializers(ClassInfo info,
java.lang.Class superclassType,
Property[] props,
java.lang.Class[] propTypes,
IndentedWriter iw) |
protected void |
generateExtraSerWriteStatements(ClassInfo info,
java.lang.Class superclassType,
Property[] props,
java.lang.Class[] propTypes,
IndentedWriter iw) |
protected void |
writeStoreObject(Property prop,
java.lang.Class propType,
IndentedWriter iw) |
protected void |
writeUnstoreObject(Property prop,
java.lang.Class propType,
IndentedWriter iw) |
public SerializableExtension(java.util.Set transientProperties, java.util.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 java.util.Collection extraGeneralImports()
extraGeneralImports
in interface GeneratorExtension
public java.util.Collection extraSpecificImports()
extraSpecificImports
in interface GeneratorExtension
public java.util.Collection extraInterfaceNames()
extraInterfaceNames
in interface GeneratorExtension
public void generate(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw) throws java.io.IOException
generate
in interface GeneratorExtension
java.io.IOException
protected void writeStoreObject(Property prop, java.lang.Class propType, IndentedWriter iw) throws java.io.IOException
java.io.IOException
protected void writeUnstoreObject(Property prop, java.lang.Class propType, IndentedWriter iw) throws java.io.IOException
java.io.IOException
protected void generateExtraSerWriteStatements(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw) throws java.io.IOException
java.io.IOException
protected void generateExtraSerInitializers(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw) throws java.io.IOException
java.io.IOException