public class StoreAppender extends Object
Constructor and Description |
---|
StoreAppender() |
Modifier and Type | Method and Description |
---|---|
String |
convertStr(String input)
Given a string, this method replaces all occurrences of '<', '>',
'&', and '"'.
|
Object |
defaultInstance(Object bean)
generate default Instance
|
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)
print this Attribute value or not
|
protected void |
printAttribute(PrintWriter writer,
int indent,
Object bean,
StoreDescription desc,
String attributeName,
Object bean2,
Object value) |
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 a 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
- aDesc
- Exception
public void printOpenTag(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) throws Exception
aWriter
- indent
- bean
- aDesc
- Exception
public void printTag(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) throws Exception
aWriter
- indent
- bean
- aDesc
- Exception
public void printTagContent(PrintWriter aWriter, String tag, String content) throws Exception
aWriter
- tag
- content
- Exception
public void printTagValueArray(PrintWriter aWriter, String tag, int indent, String[] elements)
aWriter
- tag
- indent
- elements
- public void printTagArray(PrintWriter aWriter, String tag, int indent, String[] elements) throws Exception
aWriter
- tag
- indent
- elements
- Exception
public void printIndent(PrintWriter aWriter, int indent)
aWriter
- indent
- 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 storingbean
- Bean whose properties are to be rendered as attributes,Exception
- 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 storinginclude
- Should we include a className
attribute?bean
- Bean whose properties are to be rendered as attributes,desc
- RegistryDescrpitor from this beanException
- if an exception occurs while storingprotected void printAttribute(PrintWriter writer, int indent, Object bean, StoreDescription desc, String attributeName, Object bean2, Object value)
writer
- indent
- bean
- desc
- attributeName
- bean2
- value
- public boolean isPrintValue(Object bean, Object bean2, String attrName, StoreDescription desc)
bean
- orginal beanbean2
- default beanattrName
- attribute namedesc
- StoreDescription from beanpublic Object defaultInstance(Object bean) throws InstantiationException, IllegalAccessException
bean
- InstantiationException
IllegalAccessException
public void printValue(PrintWriter writer, int indent, String name, Object value)
writer
- name
- value
- public String convertStr(String input)
protected boolean isPersistable(Class<?> clazz)
clazz
- Java class to be testedCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.