public class JavaBeanHelperWriter extends JavaClassWriter
| Modifier and Type | Field and Description |
|---|---|
protected Vector |
attributes
Field attributes
|
protected boolean |
canSearchParents
Field canSearchParents
|
protected Vector |
elementMetaData
Field elementMetaData
|
protected Vector |
elements
Field elements
|
protected TypeEntry |
extendType
Field extendType
|
protected Set |
reservedPropNames
Field reservedPropNames
|
protected TypeEntry |
type
Field type
|
protected PrintWriter |
wrapperPW
Field wrapperPW
|
className, namespaces, packageNameemitter, LINE_LENGTH| Modifier | Constructor and Description |
|---|---|
protected |
JavaBeanHelperWriter(Emitter emitter,
TypeEntry type,
Vector elements,
TypeEntry extendType,
Vector attributes,
Set reservedPropNames)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
closePrintWriter(PrintWriter pw)
Only close the PrintWriter if the PrintWriter belongs to
this class.
|
protected PrintWriter |
getPrintWriter(String filename)
The default behaviour (of super.getPrintWriter) is, given the
file name, create a PrintWriter for it.
|
protected void |
registerFile(String file)
Only register the filename if the bean helper is not wrapped
within a bean.
|
protected void |
setPrintWriter(PrintWriter pw)
The bean helper class may be its own class, or it may be
embedded within the bean class.
|
protected String |
verboseMessage(String file)
Return the string: "Generating
|
protected void |
writeDeserializer(PrintWriter pw)
write Deserializer getter code and pass in meta data to avoid
undo introspection.
|
protected void |
writeFileBody(PrintWriter pw)
Generate the file body for the bean helper.
|
protected void |
writeFileFooter(PrintWriter pw)
Only write the file footer if the bean helper is not
wrapped within a bean.
|
protected void |
writeFileHeader(PrintWriter pw)
Only write the file header if the bean helper is not wrapped
within a bean.
|
protected void |
writeMetaData(PrintWriter pw)
write MetaData code
|
protected void |
writeSerializer(PrintWriter pw)
write Serializer getter code and pass in meta data to avoid
undo introspection.
|
getClassModifiers, getClassName, getClassText, getExtendsText, getFileName, getImplementsText, getPackage, writeHeaderComments, writePackagegenerate, getJavadocDescriptionPart, isFileGenerated, writeComment, writeCommentprotected TypeEntry type
protected Vector elements
protected Vector attributes
protected TypeEntry extendType
protected PrintWriter wrapperPW
protected Vector elementMetaData
protected boolean canSearchParents
protected Set reservedPropNames
protected JavaBeanHelperWriter(Emitter emitter, TypeEntry type, Vector elements, TypeEntry extendType, Vector attributes, Set reservedPropNames)
emitter - type - The type representing this classelements - Vector containing the Type and name of each propertyextendType - The type representing the extended class (or null)attributes - Vector containing the attribute types and namesprotected void setPrintWriter(PrintWriter pw)
pw - protected PrintWriter getPrintWriter(String filename) throws IOException
getPrintWriter in class JavaWriterfilename - IOExceptionprotected void registerFile(String file)
registerFile in class JavaClassWriterfile - protected String verboseMessage(String file)
verboseMessage in class JavaWriterfile - protected void writeFileHeader(PrintWriter pw) throws IOException
writeFileHeader in class JavaClassWriterpw - IOExceptionprotected void writeFileBody(PrintWriter pw) throws IOException
writeFileBody in class JavaWriterpw - IOExceptionprotected void writeFileFooter(PrintWriter pw) throws IOException
writeFileFooter in class JavaClassWriterpw - IOExceptionprotected void closePrintWriter(PrintWriter pw)
closePrintWriter in class JavaWriterpw - protected void writeMetaData(PrintWriter pw) throws IOException
pw - IOExceptionprotected void writeSerializer(PrintWriter pw) throws IOException
pw - IOExceptionprotected void writeDeserializer(PrintWriter pw) throws IOException
pw - IOExceptionCopyright © The Apache Software Foundation. All Rights Reserved.