|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xeril.xml.ClassToDtd
This class is used to produce a DTD from a class
Field Summary | |
static java.lang.String |
NULL_TAG
The constant for null objects |
Constructor Summary | |
ClassToDtd(java.io.PrintWriter out)
Constructor. |
Method Summary | |
static void |
classToDtd(java.lang.Class clazz,
java.io.PrintWriter out)
Displays the Dtd corresponding to the class. |
protected void |
displayArray(java.lang.Class clazz,
java.lang.String tag_name,
XmlMapper mapper)
Displays an array. |
protected void |
displayClass(java.lang.Class clazz)
Displays the Dtd for the class. |
void |
displayDtd(java.lang.Class clazz)
Displays the Dtd for the class. |
protected void |
displayField(java.lang.Class clazz,
java.lang.String tag_name,
XmlMapDescriptor map_desc)
Displays a field. |
protected void |
displayValue(java.lang.Class clazz,
java.lang.String tag_name,
XmlMapper mapper)
Displays a value. |
java.lang.String |
getTagNameFromClass(java.lang.Class clazz)
Gets the tag name from the class. |
protected XmlMapDescriptor |
getXmlMapDescriptor(java.lang.String field_name,
XmlInfo info)
Tries to extract the map descriptor the field_name and info object. |
static void |
main(java.lang.String[] args)
Main method... |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String NULL_TAG
Constructor Detail |
public ClassToDtd(java.io.PrintWriter out)
out
- the writer to write the dtd resultMethod Detail |
public static void classToDtd(java.lang.Class clazz, java.io.PrintWriter out)
clazz
- the class for which to generate the Dtdout
- the print writer for writing the resultpublic void displayDtd(java.lang.Class clazz)
clazz
- the class for which to generate the Dtdprotected void displayClass(java.lang.Class clazz)
clazz
- the class for which to generate the Dtdprotected void displayField(java.lang.Class clazz, java.lang.String tag_name, XmlMapDescriptor map_desc)
null
) to be able to (eventually) extract some information
from it.
clazz
- the class of the fieldtag_name
- the name of the tag of the fieldmap_desc
- the map descriptorprotected void displayArray(java.lang.Class clazz, java.lang.String tag_name, XmlMapper mapper)
null
) to be able to (eventually) extract some information
from it.
clazz
- the class of the fieldtag_name
- the name of the tag of the fieldmapper
- the mapperprotected void displayValue(java.lang.Class clazz, java.lang.String tag_name, XmlMapper mapper)
null
) to be able to (eventually) extract some information
from it.
clazz
- the class of the fieldtag_name
- the name of the tag of the fieldmapper
- the mapperpublic java.lang.String getTagNameFromClass(java.lang.Class clazz)
clazz
- the class to get the tag nameprotected XmlMapDescriptor getXmlMapDescriptor(java.lang.String field_name, XmlInfo info)
null
is
returned.
field_name
- the name of the field we are looking for its map descinfo
- the info object that may hold the tag namepublic static void main(java.lang.String[] args) throws java.lang.ClassNotFoundException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |