com.mchange.v2.codegen.bean
Class IndirectingSerializableExtension

java.lang.Object
  extended by com.mchange.v2.codegen.bean.SerializableExtension
      extended by com.mchange.v2.codegen.bean.IndirectingSerializableExtension
All Implemented Interfaces:
GeneratorExtension

public class IndirectingSerializableExtension
extends SerializableExtension


Field Summary
protected  String findIndirectorExpr
           
protected  String indirectorClassName
           
 
Constructor Summary
protected IndirectingSerializableExtension()
           
  IndirectingSerializableExtension(String indirectorClassName)
          We expect this indirector to be a public class with a public no_arg ctor; If you need the indirector initialized somehow, you'll have to extend the class.
 
Method Summary
 Collection extraSpecificImports()
           
 void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw)
           
protected  IndirectPolicy indirectingPolicy(Property prop, Class propType)
           
protected  void writeExtraDeclarations(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw)
           
protected  void writeIndirectStoreObject(Property prop, Class propType, IndentedWriter iw)
           
protected  void writeInitializeIndirector(Property prop, Class propType, IndentedWriter iw)
          hook method...
protected  void writeStoreObject(Property prop, Class propType, IndentedWriter iw)
           
protected  void writeUnstoreObject(Property prop, Class propType, IndentedWriter iw)
           
 
Methods inherited from class com.mchange.v2.codegen.bean.SerializableExtension
extraGeneralImports, extraInterfaceNames, generateExtraSerInitializers, generateExtraSerWriteStatements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

findIndirectorExpr

protected String findIndirectorExpr

indirectorClassName

protected String indirectorClassName
Constructor Detail

IndirectingSerializableExtension

public IndirectingSerializableExtension(String indirectorClassName)
We expect this indirector to be a public class with a public no_arg ctor; If you need the indirector initialized somehow, you'll have to extend the class.

See Also:
writeInitializeIndirector(com.mchange.v2.codegen.bean.Property, java.lang.Class, com.mchange.v2.codegen.IndentedWriter), writeExtraDeclarations(com.mchange.v2.codegen.bean.ClassInfo, java.lang.Class, com.mchange.v2.codegen.bean.Property[], java.lang.Class[], com.mchange.v2.codegen.IndentedWriter)

IndirectingSerializableExtension

protected IndirectingSerializableExtension()
Method Detail

extraSpecificImports

public Collection extraSpecificImports()
Specified by:
extraSpecificImports in interface GeneratorExtension
Overrides:
extraSpecificImports in class SerializableExtension

indirectingPolicy

protected IndirectPolicy indirectingPolicy(Property prop,
                                           Class propType)

writeInitializeIndirector

protected void writeInitializeIndirector(Property prop,
                                         Class propType,
                                         IndentedWriter iw)
                                  throws IOException
hook method... does nothing by default... override at will. The indirector will be called, uh, "indirector". You are in the middle of a method when you define this.

Throws:
IOException

writeExtraDeclarations

protected void writeExtraDeclarations(ClassInfo info,
                                      Class superclassType,
                                      Property[] props,
                                      Class[] propTypes,
                                      IndentedWriter iw)
                               throws IOException
Throws:
IOException

generate

public void generate(ClassInfo info,
                     Class superclassType,
                     Property[] props,
                     Class[] propTypes,
                     IndentedWriter iw)
              throws IOException
Specified by:
generate in interface GeneratorExtension
Overrides:
generate in class SerializableExtension
Throws:
IOException

writeStoreObject

protected void writeStoreObject(Property prop,
                                Class propType,
                                IndentedWriter iw)
                         throws IOException
Overrides:
writeStoreObject in class SerializableExtension
Throws:
IOException

writeIndirectStoreObject

protected void writeIndirectStoreObject(Property prop,
                                        Class propType,
                                        IndentedWriter iw)
                                 throws IOException
Throws:
IOException

writeUnstoreObject

protected void writeUnstoreObject(Property prop,
                                  Class propType,
                                  IndentedWriter iw)
                           throws IOException
Overrides:
writeUnstoreObject in class SerializableExtension
Throws:
IOException