|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--ca.quine.jcommons.marshaller.Marshaller
| Field Summary | |
static int |
FQCN_ALWAYS
Always use a fully qualified class name. |
static int |
FQCN_FOR_NON_JDK_ONLY
Display a fully qualified class name only for non-JDK classes. |
static int |
FQCN_NEVER
Never use a fully qualified class name; always use only the class name. |
static int |
SHOW_ACTUAL_TYPE
Show the actual type being held by a field (if the object is not null), not the type declared by the field. |
static int |
SHOW_DECLARED_TYPE
Show the declared type of the field for all fields in the generated mindmap. |
| Constructor Summary | |
Marshaller(int fqcn,
int showType)
Creates a new Marshaller. |
|
Marshaller(int fqcn,
int showType,
MarshallerFactory marshallerFactory)
Creates a new Marshaller with the given MarshallerFactory. |
|
| Method Summary | |
String |
fqcn(Class clazz)
Returns a fully qualified class name or just a class name depending on the private attribute fqcn(java.lang.Class). |
static String |
htmlEntityEncode(String s)
Encodes the given String with HTML entity encoding. |
void |
marshal(Node rootNode,
Object object)
|
Map |
marshal(Object object)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int FQCN_NEVER
public static int FQCN_FOR_NON_JDK_ONLY
public static int FQCN_ALWAYS
public static int SHOW_DECLARED_TYPE
public static int SHOW_ACTUAL_TYPE
| Constructor Detail |
public Marshaller(int fqcn,
int showType)
fqcn - valid values are FQCN_ALWAYS,
FQCN_FOR_NON_JDK_ONLY and FQCN_NEVERshowType - valid values are SHOW_DECLARED_TYPE and
SHOW_ACTUAL_TYPE
public Marshaller(int fqcn,
int showType,
MarshallerFactory marshallerFactory)
fqcn - valid values are FQCN_ALWAYS,
FQCN_FOR_NON_JDK_ONLY and
FQCN_NEVERshowType - valid values are SHOW_DECLARED_TYPE
and SHOW_ACTUAL_TYPEmarshallerFactory - by subclassing MarshallerFactory
and providing that implementation here, it is
possible to extend the existing marshalling
behaviour| Method Detail |
public Map marshal(Object object)
throws NoSuchFieldException,
IllegalAccessException,
ClassNotFoundException
NoSuchFieldException
IllegalAccessException
ClassNotFoundException
public void marshal(Node rootNode,
Object object)
throws NoSuchFieldException,
IllegalAccessException,
ClassNotFoundException
NoSuchFieldException
IllegalAccessException
ClassNotFoundExceptionpublic String fqcn(Class clazz)
fqcn(java.lang.Class).
fqcn(java.lang.Class)public static String htmlEntityEncode(String s)
String with HTML entity encoding.
Taken and modified from:
http://www.owasp.org/index.php/How_to_perform_HTML_entity_encoding_in_Java
on Dec 1, 2007.
s - the String to entity encode
String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||