Package com.mchange.v2.codegen.bean
Class IndirectingSerializableExtension
- java.lang.Object
-
- com.mchange.v2.codegen.bean.SerializableExtension
-
- com.mchange.v2.codegen.bean.IndirectingSerializableExtension
-
- All Implemented Interfaces:
GeneratorExtension
public class IndirectingSerializableExtension extends SerializableExtension
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
findIndirectorExpr
protected java.lang.String
indirectorClassName
-
Constructor Summary
Constructors Modifier Constructor Description protected
IndirectingSerializableExtension()
IndirectingSerializableExtension(java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection
extraSpecificImports()
void
generate(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw)
protected IndirectPolicy
indirectingPolicy(Property prop, java.lang.Class propType)
protected void
writeExtraDeclarations(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw)
protected void
writeIndirectStoreObject(Property prop, java.lang.Class propType, IndentedWriter iw)
protected void
writeInitializeIndirector(Property prop, java.lang.Class propType, IndentedWriter iw)
hook method...protected void
writeStoreObject(Property prop, java.lang.Class propType, IndentedWriter iw)
protected void
writeUnstoreObject(Property prop, java.lang.Class propType, IndentedWriter iw)
-
Methods inherited from class com.mchange.v2.codegen.bean.SerializableExtension
extraGeneralImports, extraInterfaceNames, generateExtraSerInitializers, generateExtraSerWriteStatements
-
-
-
-
Constructor Detail
-
IndirectingSerializableExtension
public IndirectingSerializableExtension(java.lang.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 java.util.Collection extraSpecificImports()
- Specified by:
extraSpecificImports
in interfaceGeneratorExtension
- Overrides:
extraSpecificImports
in classSerializableExtension
-
indirectingPolicy
protected IndirectPolicy indirectingPolicy(Property prop, java.lang.Class propType)
-
writeInitializeIndirector
protected void writeInitializeIndirector(Property prop, java.lang.Class propType, IndentedWriter iw) throws java.io.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:
java.io.IOException
-
writeExtraDeclarations
protected void writeExtraDeclarations(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw) throws java.io.IOException
- Throws:
java.io.IOException
-
generate
public void generate(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw) throws java.io.IOException
- Specified by:
generate
in interfaceGeneratorExtension
- Overrides:
generate
in classSerializableExtension
- Throws:
java.io.IOException
-
writeStoreObject
protected void writeStoreObject(Property prop, java.lang.Class propType, IndentedWriter iw) throws java.io.IOException
- Overrides:
writeStoreObject
in classSerializableExtension
- Throws:
java.io.IOException
-
writeIndirectStoreObject
protected void writeIndirectStoreObject(Property prop, java.lang.Class propType, IndentedWriter iw) throws java.io.IOException
- Throws:
java.io.IOException
-
writeUnstoreObject
protected void writeUnstoreObject(Property prop, java.lang.Class propType, IndentedWriter iw) throws java.io.IOException
- Overrides:
writeUnstoreObject
in classSerializableExtension
- Throws:
java.io.IOException
-
-