Top Description Fields Constructors Methods
com.mchange.v2.codegen.bean

public Class SerializableExtension

extends Object
implements GeneratorExtension
Class Inheritance
All Implemented Interfaces
com.mchange.v2.codegen.bean.GeneratorExtension
Known Direct Subclasses
com.mchange.v2.codegen.bean.IndirectingSerializableExtension
Imports
java.util.*, java.io.IOException, com.mchange.v2.codegen.IndentedWriter

Note

this class pays no attention to whether users have marked any property variables as transient. In fact, it will work most efficiently if users mark ALL variables as transient... to define transient properties for this class, use the constructor which allows a user-specified set of transients.

Field Summary

Modifier and TypeField and Description
pack-priv Set<E>
pack-priv Map<K, V>

Constructor Summary

AccessConstructor and Description
public
SerializableExtension(Set<E>
a set of Strings, the names of all properties that should be considered transient and not serialized
transientProperties
,
Map<K, V>
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.
transientPropertyInitializers
)

public

Method Summary

Modifier and TypeMethod and Description
public Collection<E>
public Collection<E>
public Collection<E>
public void
generate(ClassInfo info, Class<T> superclassType, Property[] props, Class<T>[] propTypes, IndentedWriter iw)

Implements com.mchange.v2.codegen.bean.GeneratorExtension.generate.

Deprecated as a consequence of IndentedWriter being deprecated.

protected void
generateExtraSerInitializers(ClassInfo info, Class<T> superclassType, Property[] props, Class<T>[] propTypes, IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

protected void
generateExtraSerWriteStatements(ClassInfo info, Class<T> superclassType, Property[] props, Class<T>[] propTypes, IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

protected void
writeStoreObject(Property prop, Class<T> propType, IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

protected void
writeUnstoreObject(Property prop, Class<T> propType, IndentedWriter iw)
Deprecated as a consequence of IndentedWriter being deprecated.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

transientPropertiesback to summary
pack-priv Set<E> transientProperties
transientPropertyInitializersback to summary
pack-priv Map<K, V> transientPropertyInitializers

Constructor Detail

SerializableExtensionback to summary
public SerializableExtension(Set<E> transientProperties, Map<K, V> transientPropertyInitializers)
Parameters
transientProperties:Set<E>

a set of Strings, the names of all properties that should be considered transient and not serialized

transientPropertyInitializers:Map<K, V>

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.

SerializableExtensionback to summary
public SerializableExtension()

Method Detail

extraGeneralImportsback to summary
public Collection<E> extraGeneralImports()

Implements com.mchange.v2.codegen.bean.GeneratorExtension.extraGeneralImports.

extraInterfaceNamesback to summary
public Collection<E> extraInterfaceNames()

Implements com.mchange.v2.codegen.bean.GeneratorExtension.extraInterfaceNames.

extraSpecificImportsback to summary
public Collection<E> extraSpecificImports()

Implements com.mchange.v2.codegen.bean.GeneratorExtension.extraSpecificImports.

generateback to summary
public void generate(ClassInfo info, Class<T> superclassType, Property[] props, Class<T>[] propTypes, IndentedWriter iw) throws IOException

Implements com.mchange.v2.codegen.bean.GeneratorExtension.generate.

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

generateExtraSerInitializersback to summary
protected void generateExtraSerInitializers(ClassInfo info, Class<T> superclassType, Property[] props, Class<T>[] propTypes, IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

generateExtraSerWriteStatementsback to summary
protected void generateExtraSerWriteStatements(ClassInfo info, Class<T> superclassType, Property[] props, Class<T>[] propTypes, IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

writeStoreObjectback to summary
protected void writeStoreObject(Property prop, Class<T> propType, IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.

writeUnstoreObjectback to summary
protected void writeUnstoreObject(Property prop, Class<T> propType, IndentedWriter iw) throws IOException

Deprecated

as a consequence of IndentedWriter being deprecated. See corresponding docs for further information.