Class SimplePropertyBeanGenerator

java.lang.Object
com.mchange.v2.codegen.bean.SimplePropertyBeanGenerator
All Implemented Interfaces:
PropertyBeanGenerator
Direct Known Subclasses:
InnerBeanPropertyBeanGenerator

public class SimplePropertyBeanGenerator extends Object implements PropertyBeanGenerator
  • Field Details

    • info

      protected ClassInfo info
    • props

      protected Property[] props
    • iw

      protected IndentedWriter iw
    • generalImports

      protected Set generalImports
    • specificImports

      protected Set specificImports
    • interfaceNames

      protected Set interfaceNames
    • superclassType

      protected Class superclassType
    • interfaceTypes

      protected List interfaceTypes
    • propertyTypes

      protected Class[] propertyTypes
    • generatorExtensions

      protected List generatorExtensions
  • Constructor Details

    • SimplePropertyBeanGenerator

      public SimplePropertyBeanGenerator()
  • Method Details

    • setInner

      public void setInner(boolean inner)
    • isInner

      public boolean isInner()
    • setJavaVersion

      public void setJavaVersion(int java_version)
      Parameters:
      java_version - a three digit number -- for example Java 1.3.1 is 131
    • getJavaVersion

      public int getJavaVersion()
    • setGeneratorName

      public void setGeneratorName(String generatorName)
    • getGeneratorName

      public String getGeneratorName()
    • setForceUnmodifiable

      public void setForceUnmodifiable(boolean force_unmodifiable)
    • isForceUnmodifiable

      public boolean isForceUnmodifiable()
    • addExtension

      public void addExtension(GeneratorExtension ext)
    • removeExtension

      public void removeExtension(GeneratorExtension ext)
    • generate

      public void generate(ClassInfo info, Property[] props, Writer w) throws IOException
      Specified by:
      generate in interface PropertyBeanGenerator
      Throws:
      IOException
    • resolveTypes

      protected void resolveTypes()
    • addInternalImports

      protected void addInternalImports()
    • addInternalInterfaces

      protected void addInternalInterfaces()
    • writeCoreBody

      protected void writeCoreBody() throws IOException
      Throws:
      IOException
    • writeInternalUtilityFunctions

      protected void writeInternalUtilityFunctions() throws IOException
      Throws:
      IOException
    • writeConstrainedPropertyEventSourceMethods

      protected void writeConstrainedPropertyEventSourceMethods() throws IOException
      Throws:
      IOException
    • writeBoundPropertyEventSourceMethods

      protected void writeBoundPropertyEventSourceMethods() throws IOException
      Throws:
      IOException
    • writeJavaBeansChangeSupport

      protected void writeJavaBeansChangeSupport() throws IOException
      Throws:
      IOException
    • writeOtherVariables

      protected void writeOtherVariables() throws IOException
      Throws:
      IOException
    • writeOtherFunctions

      protected void writeOtherFunctions() throws IOException
      Throws:
      IOException
    • writeOtherClasses

      protected void writeOtherClasses() throws IOException
      Throws:
      IOException
    • writePropertyVariables

      protected void writePropertyVariables() throws IOException
      Throws:
      IOException
    • writePropertyVariable

      protected void writePropertyVariable(Property prop) throws IOException
      Throws:
      IOException
    • writePropertyMembers

      protected void writePropertyMembers() throws IOException
      Deprecated.
      Throws:
      IOException
    • writePropertyMember

      protected void writePropertyMember(Property prop) throws IOException
      Deprecated.
      Throws:
      IOException
    • writeGetterSetterPairs

      protected void writeGetterSetterPairs() throws IOException
      Throws:
      IOException
    • writeGetterSetterPair

      protected void writeGetterSetterPair(Property prop, Class propType) throws IOException
      Throws:
      IOException
    • writePropertyGetter

      protected void writePropertyGetter(Property prop, Class propType) throws IOException
      Throws:
      IOException
    • writePropertySetter

      protected void writePropertySetter(Property prop, Class propType) throws IOException
      Throws:
      IOException
    • getGetterDefensiveCopyExpression

      protected String getGetterDefensiveCopyExpression(Property prop, Class propType)
    • getSetterDefensiveCopyExpression

      protected String getSetterDefensiveCopyExpression(Property prop, Class propType)
    • getConstructorDefensiveCopyExpression

      protected String getConstructorDefensiveCopyExpression(Property prop, Class propType)
    • writeHeader

      protected void writeHeader() throws IOException
      Throws:
      IOException
    • writeBannerComments

      protected void writeBannerComments() throws IOException
      Throws:
      IOException
    • generateClassJavaDocComment

      protected void generateClassJavaDocComment() throws IOException
      Throws:
      IOException
    • writeImports

      protected void writeImports() throws IOException
      Throws:
      IOException
    • writeClassDeclaration

      protected void writeClassDeclaration() throws IOException
      Throws:
      IOException
    • main

      public static void main(String[] argv)