public class SimplePropertyBeanGenerator extends java.lang.Object implements PropertyBeanGenerator
Modifier and Type | Field and Description |
---|---|
protected java.util.Set |
generalImports |
protected java.util.List |
generatorExtensions |
protected ClassInfo |
info |
protected java.util.Set |
interfaceNames |
protected java.util.List |
interfaceTypes |
protected IndentedWriter |
iw |
protected java.lang.Class[] |
propertyTypes |
protected Property[] |
props |
protected java.util.Set |
specificImports |
protected java.lang.Class |
superclassType |
Constructor and Description |
---|
SimplePropertyBeanGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
addExtension(GeneratorExtension ext) |
protected void |
addInternalImports() |
protected void |
addInternalInterfaces() |
void |
generate(ClassInfo info,
Property[] props,
java.io.Writer w) |
protected void |
generateClassJavaDocComment() |
protected java.lang.String |
getConstructorDefensiveCopyExpression(Property prop,
java.lang.Class propType) |
java.lang.String |
getGeneratorName() |
protected java.lang.String |
getGetterDefensiveCopyExpression(Property prop,
java.lang.Class propType) |
int |
getJavaVersion() |
protected java.lang.String |
getSetterDefensiveCopyExpression(Property prop,
java.lang.Class propType) |
boolean |
isForceUnmodifiable() |
boolean |
isInner() |
static void |
main(java.lang.String[] argv) |
void |
removeExtension(GeneratorExtension ext) |
protected void |
resolveTypes() |
void |
setForceUnmodifiable(boolean force_unmodifiable) |
void |
setGeneratorName(java.lang.String generatorName) |
void |
setInner(boolean inner) |
void |
setJavaVersion(int java_version) |
protected void |
writeBannerComments() |
protected void |
writeBoundPropertyEventSourceMethods() |
protected void |
writeClassDeclaration() |
protected void |
writeConstrainedPropertyEventSourceMethods() |
protected void |
writeCoreBody() |
protected void |
writeGetterSetterPair(Property prop,
java.lang.Class propType) |
protected void |
writeGetterSetterPairs() |
protected void |
writeHeader() |
protected void |
writeImports() |
protected void |
writeInternalUtilityFunctions() |
protected void |
writeJavaBeansChangeSupport() |
protected void |
writeOtherClasses() |
protected void |
writeOtherFunctions() |
protected void |
writeOtherVariables() |
protected void |
writePropertyGetter(Property prop,
java.lang.Class propType) |
protected void |
writePropertyMember(Property prop)
Deprecated.
|
protected void |
writePropertyMembers()
Deprecated.
|
protected void |
writePropertySetter(Property prop,
java.lang.Class propType) |
protected void |
writePropertyVariable(Property prop) |
protected void |
writePropertyVariables() |
protected ClassInfo info
protected Property[] props
protected IndentedWriter iw
protected java.util.Set generalImports
protected java.util.Set specificImports
protected java.util.Set interfaceNames
protected java.lang.Class superclassType
protected java.util.List interfaceTypes
protected java.lang.Class[] propertyTypes
protected java.util.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(java.lang.String generatorName)
public java.lang.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, java.io.Writer w) throws java.io.IOException
generate
in interface PropertyBeanGenerator
java.io.IOException
protected void resolveTypes()
protected void addInternalImports()
protected void addInternalInterfaces()
protected void writeCoreBody() throws java.io.IOException
java.io.IOException
protected void writeInternalUtilityFunctions() throws java.io.IOException
java.io.IOException
protected void writeConstrainedPropertyEventSourceMethods() throws java.io.IOException
java.io.IOException
protected void writeBoundPropertyEventSourceMethods() throws java.io.IOException
java.io.IOException
protected void writeJavaBeansChangeSupport() throws java.io.IOException
java.io.IOException
protected void writeOtherVariables() throws java.io.IOException
java.io.IOException
protected void writeOtherFunctions() throws java.io.IOException
java.io.IOException
protected void writeOtherClasses() throws java.io.IOException
java.io.IOException
protected void writePropertyVariables() throws java.io.IOException
java.io.IOException
protected void writePropertyVariable(Property prop) throws java.io.IOException
java.io.IOException
protected void writePropertyMembers() throws java.io.IOException
java.io.IOException
protected void writePropertyMember(Property prop) throws java.io.IOException
java.io.IOException
protected void writeGetterSetterPairs() throws java.io.IOException
java.io.IOException
protected void writeGetterSetterPair(Property prop, java.lang.Class propType) throws java.io.IOException
java.io.IOException
protected void writePropertyGetter(Property prop, java.lang.Class propType) throws java.io.IOException
java.io.IOException
protected void writePropertySetter(Property prop, java.lang.Class propType) throws java.io.IOException
java.io.IOException
protected java.lang.String getGetterDefensiveCopyExpression(Property prop, java.lang.Class propType)
protected java.lang.String getSetterDefensiveCopyExpression(Property prop, java.lang.Class propType)
protected java.lang.String getConstructorDefensiveCopyExpression(Property prop, java.lang.Class propType)
protected void writeHeader() throws java.io.IOException
java.io.IOException
protected void writeBannerComments() throws java.io.IOException
java.io.IOException
protected void generateClassJavaDocComment() throws java.io.IOException
java.io.IOException
protected void writeImports() throws java.io.IOException
java.io.IOException
protected void writeClassDeclaration() throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] argv)