public class SimplePropertyBeanGenerator extends Object implements PropertyBeanGenerator
Modifier and Type | Field and Description |
---|---|
protected Set |
generalImports |
protected List |
generatorExtensions |
protected ClassInfo |
info |
protected Set |
interfaceNames |
protected List |
interfaceTypes |
protected IndentedWriter |
iw |
protected Class[] |
propertyTypes |
protected Property[] |
props |
protected Set |
specificImports |
protected Class |
superclassType |
Constructor and Description |
---|
SimplePropertyBeanGenerator() |
protected ClassInfo info
protected Property[] props
protected IndentedWriter iw
protected Set generalImports
protected Set specificImports
protected Set interfaceNames
protected Class superclassType
protected List interfaceTypes
protected Class[] propertyTypes
protected List generatorExtensions
public void setInner(boolean inner)
public boolean isInner()
public void setJavaVersion(int java_version)
java_version
- a three digit number -- for example Java 1.3.1 is 131public int getJavaVersion()
public void setGeneratorName(String generatorName)
public String getGeneratorName()
public void setForceUnmodifiable(boolean force_unmodifiable)
public boolean isForceUnmodifiable()
public void addExtension(GeneratorExtension ext)
public void removeExtension(GeneratorExtension ext)
public void generate(ClassInfo info, Property[] props, Writer w) throws IOException
generate
in interface PropertyBeanGenerator
IOException
protected void resolveTypes()
protected void addInternalImports()
protected void addInternalInterfaces()
protected void writeCoreBody() throws IOException
IOException
protected void writeInternalUtilityFunctions() throws IOException
IOException
protected void writeConstrainedPropertyEventSourceMethods() throws IOException
IOException
protected void writeBoundPropertyEventSourceMethods() throws IOException
IOException
protected void writeJavaBeansChangeSupport() throws IOException
IOException
protected void writeOtherVariables() throws IOException
IOException
protected void writeOtherFunctions() throws IOException
IOException
protected void writeOtherClasses() throws IOException
IOException
protected void writePropertyVariables() throws IOException
IOException
protected void writePropertyVariable(Property prop) throws IOException
IOException
protected void writePropertyMembers() throws IOException
IOException
protected void writePropertyMember(Property prop) throws IOException
IOException
protected void writeGetterSetterPairs() throws IOException
IOException
protected void writeGetterSetterPair(Property prop, Class propType) throws IOException
IOException
protected void writePropertyGetter(Property prop, Class propType) throws IOException
IOException
protected void writePropertySetter(Property prop, Class propType) throws IOException
IOException
protected String getGetterDefensiveCopyExpression(Property prop, Class propType)
protected String getSetterDefensiveCopyExpression(Property prop, Class propType)
protected String getConstructorDefensiveCopyExpression(Property prop, Class propType)
protected void writeHeader() throws IOException
IOException
protected void writeBannerComments() throws IOException
IOException
protected void generateClassJavaDocComment() throws IOException
IOException
protected void writeImports() throws IOException
IOException
protected void writeClassDeclaration() throws IOException
IOException
public static void main(String[] argv)
Copyright © 2017 com.mchange. All rights reserved.