XML Output

Design rationale

The XML generated by the doclet uses the Java terminology as much as possible.

Elements

Elements usually map to the corresponding Object in the Doclet API (Class, Constructor, Method, etc...)

Attributes

Attributes usually correspond to methods returning primitive values. For example, Doclets methods returning boolean values will be expressed as attributes which value is either true or false (abstract, final, static, etc...)

 

Files

The XML generated for each file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xlink="http://www.w3.org/1999/xlink">
  <meta created="2013-02-20T14:20:14" />
  <class> ... </class> *
</root>

 

Class

Each class is represented as:

<class abstract="false" final="true" superclass="Object"
       visibility="public" 
            name="org.pageseeder.SampleClass"
         package="org.pageseeder" enum="false" serializable="false" interface="false" 
superclassfulltype="java.lang.Object" fulltype="org.pageseeder.SampleClass" type="SampleClass">
    <implements>
      <interface fulltype="org.pageseeder.Example" type="Example" />
    </implements>
    <comment>This is a samples to be used as an example.</comment>
    <annotations>
      <annotation name="TestMe" />
    </annotations>
    <author>John Smith</author>
    <version>1.3</version>
    <since>1.0</since>
    <constructors> ... </constructors>
    <methods> ... </methods>
</class>

 

Constructors

Each constructor will have the following XML format:

<constructor final="false"
            static="false" 
      synchronized="false"
        visibility="public"
              name="SampleClass"
         synthetic="false"
         interface="false" />

Methods

<methods>
 <method abstract="false" final="false" static="false" synchronized="false" visibility="public" name="setName" synthetic="false" fulltype="org.pageseeder.Nameable" type="Nameable" interface="false">
   <parameters>
     <parameter name="req" fulltype="java.lang.String" type="String" />
    </parameters>
  </method>
  <method abstract="false" final="false" static="false" synchronized="false" visibility="public" name="copy" synthetic="false" fulltype="void" type="void" interface="false">
    <parameters>
      <parameter name="in"  fulltype="java.io.Reader" type="Reader" />
      <parameter name="out" fulltype="java.io.Writer" type="Writer" />
    </parameters>
    <exceptions>
      <exception fulltype="java.io.IOException" type="IOException" />
    </exceptions>
  </method>
 </methods>

 

Created on , last edited on