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.StringfindIndirectorExprprotected java.lang.StringindirectorClassName
-
Constructor Summary
Constructors Modifier Constructor Description protectedIndirectingSerializableExtension()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.CollectionextraSpecificImports()voidgenerate(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw)protected IndirectPolicyindirectingPolicy(Property prop, java.lang.Class propType)protected voidwriteExtraDeclarations(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw)protected voidwriteIndirectStoreObject(Property prop, java.lang.Class propType, IndentedWriter iw)protected voidwriteInitializeIndirector(Property prop, java.lang.Class propType, IndentedWriter iw)hook method...protected voidwriteStoreObject(Property prop, java.lang.Class propType, IndentedWriter iw)protected voidwriteUnstoreObject(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:
extraSpecificImportsin interfaceGeneratorExtension- Overrides:
extraSpecificImportsin 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:
generatein interfaceGeneratorExtension- Overrides:
generatein classSerializableExtension- Throws:
java.io.IOException
-
writeStoreObject
protected void writeStoreObject(Property prop, java.lang.Class propType, IndentedWriter iw) throws java.io.IOException
- Overrides:
writeStoreObjectin 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:
writeUnstoreObjectin classSerializableExtension- Throws:
java.io.IOException
-
-