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)
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 PropertyBeanGeneratorIOExceptionprotected void resolveTypes()
protected void addInternalImports()
protected void addInternalInterfaces()
protected void writeCoreBody()
throws IOException
IOExceptionprotected void writeInternalUtilityFunctions()
throws IOException
IOExceptionprotected void writeConstrainedPropertyEventSourceMethods()
throws IOException
IOExceptionprotected void writeBoundPropertyEventSourceMethods()
throws IOException
IOExceptionprotected void writeJavaBeansChangeSupport()
throws IOException
IOExceptionprotected void writeOtherVariables()
throws IOException
IOExceptionprotected void writeOtherFunctions()
throws IOException
IOExceptionprotected void writeOtherClasses()
throws IOException
IOExceptionprotected void writePropertyVariables()
throws IOException
IOExceptionprotected void writePropertyVariable(Property prop) throws IOException
IOExceptionprotected void writePropertyMembers()
throws IOException
IOExceptionprotected void writePropertyMember(Property prop) throws IOException
IOExceptionprotected void writeGetterSetterPairs()
throws IOException
IOExceptionprotected void writeGetterSetterPair(Property prop, Class propType) throws IOException
IOExceptionprotected void writePropertyGetter(Property prop, Class propType) throws IOException
IOExceptionprotected void writePropertySetter(Property prop, Class propType) throws IOException
IOExceptionprotected 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
IOExceptionprotected void writeBannerComments()
throws IOException
IOExceptionprotected void writeImports()
throws IOException
IOExceptionprotected void writeClassDeclaration()
throws IOException
IOExceptionpublic static void main(String[] argv)