public class StoreAppender
extends java.lang.Object
Constructor and Description |
---|
StoreAppender() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
defaultInstance(java.lang.Object bean)
Generate default Instance for the specified bean.
|
protected boolean |
isPersistable(java.lang.Class<?> clazz)
Is the specified property type one for which we should generate a
persistence attribute?
|
boolean |
isPrintValue(java.lang.Object bean,
java.lang.Object bean2,
java.lang.String attrName,
StoreDescription desc)
Determine if the attribute value needs to be stored.
|
protected void |
printAttribute(java.io.PrintWriter writer,
int indent,
java.lang.Object bean,
StoreDescription desc,
java.lang.String attributeName,
java.lang.Object bean2,
java.lang.Object value)
Store the specified of the specified JavaBean.
|
void |
printAttributes(java.io.PrintWriter writer,
int indent,
boolean include,
java.lang.Object bean,
StoreDescription desc)
Store the relevant attributes of the specified JavaBean.
|
void |
printAttributes(java.io.PrintWriter writer,
int indent,
java.lang.Object bean,
StoreDescription desc)
Store the relevant attributes of the specified JavaBean, plus a
className attribute defining the fully qualified Java
class name of the bean. |
void |
printCloseTag(java.io.PrintWriter aWriter,
StoreDescription aDesc)
Print the closing tag.
|
void |
printIndent(java.io.PrintWriter aWriter,
int indent)
Print some spaces.
|
void |
printOpenTag(java.io.PrintWriter aWriter,
int indent,
java.lang.Object bean,
StoreDescription aDesc)
Print only the open tag with all attributes.
|
void |
printTag(java.io.PrintWriter aWriter,
int indent,
java.lang.Object bean,
StoreDescription aDesc)
Print tag with all attributes
|
void |
printTagArray(java.io.PrintWriter aWriter,
java.lang.String tag,
int indent,
java.lang.String[] elements)
Print an array of elements.
|
void |
printTagContent(java.io.PrintWriter aWriter,
java.lang.String tag,
java.lang.String content)
Print the value from tag as content.
|
void |
printTagValueArray(java.io.PrintWriter aWriter,
java.lang.String tag,
int indent,
java.lang.String[] elements)
Print an array of values.
|
void |
printValue(java.io.PrintWriter writer,
int indent,
java.lang.String name,
java.lang.Object value)
Print an attribute value.
|
public void printCloseTag(java.io.PrintWriter aWriter, StoreDescription aDesc) throws java.lang.Exception
aWriter
- The output writeraDesc
- Store description of the current elementjava.lang.Exception
- A store error occurredpublic void printOpenTag(java.io.PrintWriter aWriter, int indent, java.lang.Object bean, StoreDescription aDesc) throws java.lang.Exception
aWriter
- The output writerindent
- Indentation levelbean
- The current bean that is storedaDesc
- Store description of the current elementjava.lang.Exception
- A store error occurredpublic void printTag(java.io.PrintWriter aWriter, int indent, java.lang.Object bean, StoreDescription aDesc) throws java.lang.Exception
aWriter
- The output writerindent
- Indentation levelbean
- The current bean that is storedaDesc
- Store description of the current elementjava.lang.Exception
- A store error occurredpublic void printTagContent(java.io.PrintWriter aWriter, java.lang.String tag, java.lang.String content) throws java.lang.Exception
aWriter
- The output writertag
- The element namecontent
- Element contentjava.lang.Exception
- A store error occurredpublic void printTagValueArray(java.io.PrintWriter aWriter, java.lang.String tag, int indent, java.lang.String[] elements)
aWriter
- The output writertag
- The element nameindent
- Indentation levelelements
- Array of element valuespublic void printTagArray(java.io.PrintWriter aWriter, java.lang.String tag, int indent, java.lang.String[] elements) throws java.lang.Exception
aWriter
- The output writertag
- The element nameindent
- Indentation levelelements
- Array of elementsjava.lang.Exception
- Store error occurredpublic void printIndent(java.io.PrintWriter aWriter, int indent)
aWriter
- The output writerindent
- The number of spacespublic void printAttributes(java.io.PrintWriter writer, int indent, java.lang.Object bean, StoreDescription desc) throws java.lang.Exception
className
attribute defining the fully qualified Java
class name of the bean.writer
- PrintWriter to which we are storingindent
- Indentation levelbean
- Bean whose properties are to be rendered as attributes,desc
- Store description of the current elementjava.lang.Exception
- if an exception occurs while storingpublic void printAttributes(java.io.PrintWriter writer, int indent, boolean include, java.lang.Object bean, StoreDescription desc) throws java.lang.Exception
writer
- PrintWriter to which we are storingindent
- Indentation levelinclude
- Should we include a className
attribute?bean
- Bean whose properties are to be rendered as attributes,desc
- RegistryDescriptor from this beanjava.lang.Exception
- if an exception occurs while storingprotected void printAttribute(java.io.PrintWriter writer, int indent, java.lang.Object bean, StoreDescription desc, java.lang.String attributeName, java.lang.Object bean2, java.lang.Object value)
writer
- PrintWriter to which we are storingindent
- Indentation levelbean
- The current beandesc
- RegistryDescriptor from this beanattributeName
- The attribute name to storebean2
- A default instance of the bean for comparisonvalue
- The attribute valuepublic boolean isPrintValue(java.lang.Object bean, java.lang.Object bean2, java.lang.String attrName, StoreDescription desc)
bean
- orginal beanbean2
- default beanattrName
- attribute namedesc
- StoreDescription from beantrue
if the value should be storedpublic java.lang.Object defaultInstance(java.lang.Object bean) throws java.lang.ReflectiveOperationException
bean
- The beanjava.lang.ReflectiveOperationException
- Error creating a new instancepublic void printValue(java.io.PrintWriter writer, int indent, java.lang.String name, java.lang.Object value)
writer
- PrintWriter to which we are storingindent
- Indentation levelname
- Attribute namevalue
- Attribute valueprotected boolean isPersistable(java.lang.Class<?> clazz)
clazz
- Java class to be testedtrue
if the specified class should be storedCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.