public class StoreAppender extends Object
| Constructor and Description |
|---|
StoreAppender() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
checkAttribute(StoreDescription desc,
PropertyDescriptor descriptor,
String attributeName,
Object bean,
Object bean2)
Check if the attribute should be printed.
|
Object |
defaultInstance(Object bean)
Generate default Instance for the specified bean.
|
protected boolean |
isPersistable(Class<?> clazz)
Is the specified property type one for which we should generate a
persistence attribute?
|
boolean |
isPrintValue(Object bean,
Object bean2,
String attrName,
StoreDescription desc)
Determine if the attribute value needs to be stored.
|
protected void |
printAttribute(PrintWriter writer,
int indent,
Object bean,
StoreDescription desc,
String attributeName,
Object bean2,
Object value)
Store the specified of the specified JavaBean.
|
void |
printAttributes(PrintWriter writer,
int indent,
boolean include,
Object bean,
StoreDescription desc)
Store the relevant attributes of the specified JavaBean.
|
void |
printAttributes(PrintWriter writer,
int indent,
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(PrintWriter aWriter,
StoreDescription aDesc)
Print the closing tag.
|
void |
printIndent(PrintWriter aWriter,
int indent)
Print some spaces.
|
void |
printOpenTag(PrintWriter aWriter,
int indent,
Object bean,
StoreDescription aDesc)
Print only the open tag with all attributes.
|
void |
printTag(PrintWriter aWriter,
int indent,
Object bean,
StoreDescription aDesc)
Print tag with all attributes
|
void |
printTagArray(PrintWriter aWriter,
String tag,
int indent,
String[] elements)
Print an array of elements.
|
void |
printTagContent(PrintWriter aWriter,
String tag,
String content)
Print the value from tag as content.
|
void |
printTagValueArray(PrintWriter aWriter,
String tag,
int indent,
String[] elements)
Print an array of values.
|
void |
printValue(PrintWriter writer,
int indent,
String name,
Object value)
Print an attribute value.
|
public void printCloseTag(PrintWriter aWriter, StoreDescription aDesc) throws Exception
aWriter - The output writeraDesc - Store description of the current elementException - A store error occurredpublic void printOpenTag(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) throws Exception
aWriter - The output writerindent - Indentation levelbean - The current bean that is storedaDesc - Store description of the current elementException - A store error occurredpublic void printTag(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) throws Exception
aWriter - The output writerindent - Indentation levelbean - The current bean that is storedaDesc - Store description of the current elementException - A store error occurredpublic void printTagContent(PrintWriter aWriter, String tag, String content) throws Exception
aWriter - The output writertag - The element namecontent - Element contentException - A store error occurredpublic void printTagValueArray(PrintWriter aWriter, String tag, int indent, String[] elements)
aWriter - The output writertag - The element nameindent - Indentation levelelements - Array of element valuespublic void printTagArray(PrintWriter aWriter, String tag, int indent, String[] elements) throws Exception
aWriter - The output writertag - The element nameindent - Indentation levelelements - Array of elementsException - Store error occurredpublic void printIndent(PrintWriter aWriter, int indent)
aWriter - The output writerindent - The number of spacespublic void printAttributes(PrintWriter writer, int indent, Object bean, StoreDescription desc) throws 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 elementException - if an exception occurs while storingpublic void printAttributes(PrintWriter writer, int indent, boolean include, Object bean, StoreDescription desc) throws 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 beanException - if an exception occurs while storingprotected Object checkAttribute(StoreDescription desc, PropertyDescriptor descriptor, String attributeName, Object bean, Object bean2)
desc - RegistryDescriptor from this beandescriptor - PropertyDescriptor from this bean propertyattributeName - The attribute name to storebean - The current beanbean2 - A default instance of the bean for comparisonprotected void printAttribute(PrintWriter writer, int indent, Object bean, StoreDescription desc, String attributeName, Object bean2, 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(Object bean, Object bean2, String attrName, StoreDescription desc)
bean - original beanbean2 - default beanattrName - attribute namedesc - StoreDescription from beantrue if the value should be storedpublic Object defaultInstance(Object bean) throws ReflectiveOperationException
bean - The beanReflectiveOperationException - Error creating a new instancepublic void printValue(PrintWriter writer, int indent, String name, Object value)
writer - PrintWriter to which we are storingindent - Indentation levelname - Attribute namevalue - Attribute valueprotected boolean isPersistable(Class<?> clazz)
clazz - Java class to be testedtrue if the specified class should be storedCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.