public class Representer extends BaseRepresenter
| Modifier and Type | Class | Description |
|---|---|---|
protected class |
Representer.RepresentJavaBean |
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Map<java.lang.Class<? extends java.lang.Object>,Tag> |
classTags |
|
static java.util.regex.Pattern |
MULTILINE_PATTERN |
|
protected java.util.TimeZone |
timeZone |
defaultFlowStyle, defaultScalarStyle, multiRepresenters, nullRepresenter, objectToRepresent, representedObjects, representers| Constructor | Description |
|---|---|
Representer() |
| Modifier and Type | Method | Description |
|---|---|---|
Tag |
addClassTag(java.lang.Class<? extends java.lang.Object> clazz,
Tag tag) |
Define a tag for the
Class to serialize. |
protected void |
checkGlobalTag(Property property,
Node node,
java.lang.Object object) |
Remove redundant global tag for a type safe (generic) collection if it is
the same as defined by the JavaBean property
|
protected java.util.Set<Property> |
getProperties(java.lang.Class<? extends java.lang.Object> type) |
Get JavaBean properties to be serialised.
|
protected Tag |
getTag(java.lang.Class<?> clazz,
Tag defaultTag) |
|
java.util.TimeZone |
getTimeZone() |
|
protected MappingNode |
representJavaBean(java.util.Set<Property> properties,
java.lang.Object javaBean) |
Tag logic:
- explicit root tag is set in serializer - if there is a predefined class tag it is used - a global tag with class name is always used as tag. |
protected NodeTuple |
representJavaBeanProperty(java.lang.Object javaBean,
Property property,
java.lang.Object propertyValue,
Tag customTag) |
Represent one JavaBean property.
|
void |
setTimeZone(java.util.TimeZone timeZone) |
getDefaultFlowStyle, getPropertyUtils, isExplicitPropertyUtils, represent, representData, representMapping, representScalar, representScalar, representSequence, setDefaultFlowStyle, setDefaultScalarStyle, setPropertyUtilsprotected java.util.Map<java.lang.Class<? extends java.lang.Object>,Tag> classTags
protected java.util.TimeZone timeZone
public static java.util.regex.Pattern MULTILINE_PATTERN
protected MappingNode representJavaBean(java.util.Set<Property> properties, java.lang.Object javaBean)
properties - JavaBean gettersjavaBean - instance for Nodeprotected NodeTuple representJavaBeanProperty(java.lang.Object javaBean, Property property, java.lang.Object propertyValue, Tag customTag)
javaBean - - the instance to be representedproperty - - the property of the instancepropertyValue - - value to be representedcustomTag - - user defined Tagprotected void checkGlobalTag(Property property, Node node, java.lang.Object object)
property - - JavaBean propertynode - - representation of the propertyobject - - instance represented by the nodeprotected java.util.Set<Property> getProperties(java.lang.Class<? extends java.lang.Object> type) throws java.beans.IntrospectionException
type - - JavaBean to inspect the propertiesjava.beans.IntrospectionExceptionpublic Tag addClassTag(java.lang.Class<? extends java.lang.Object> clazz, Tag tag)
Class to serialize.clazz - Class which tag is changedtag - new tag to be used for every instance of the specified
ClassClasspublic java.util.TimeZone getTimeZone()
public void setTimeZone(java.util.TimeZone timeZone)