com.sun.jersey.wadl.resourcedoc
Interface DocProcessor

All Known Implementing Classes:
DocProcessorWrapper

public interface DocProcessor

A doc processor is handed over javadoc elements so that it can turn this into resource doc elements, even self defined.
Created on: Jul 5, 2008

Version:
$Id: DocProcessor.java 4088 2010-08-24 11:15:13Z pavel_bucek $
Author:
Martin Grotzke

Method Summary
 String[] getCDataElements()
          specify which of your elements you want to be handled as CDATA.
 Class<?>[] getRequiredJaxbContextClasses()
          Specify jaxb classes of instances that you add to the resourcedoc model.
 void processClassDoc(com.sun.javadoc.ClassDoc classDoc, ClassDocType classDocType)
          Use this method to extend the provided ClassDocType with the information from the given ClassDoc.
 void processMethodDoc(com.sun.javadoc.MethodDoc methodDoc, MethodDocType methodDocType)
          Process the provided methodDoc and add your custom information to the methodDocType.
Use e.g.
 void processParamTag(com.sun.javadoc.ParamTag paramTag, com.sun.javadoc.Parameter parameter, ParamDocType paramDocType)
          Use this method to extend the provided ParamDocType with the information from the given ParamTag and Parameter.
 

Method Detail

getRequiredJaxbContextClasses

Class<?>[] getRequiredJaxbContextClasses()
Specify jaxb classes of instances that you add to the resourcedoc model. These classes are added to the list of classes when creating the jaxb context with JAXBContext.newInstance( clazzes );.

Returns:
a list of classes or null

getCDataElements

String[] getCDataElements()
specify which of your elements you want to be handled as CDATA. The use of the '^' between the namespaceURI and the localname seems to be an implementation detail of the xerces code. When processing xml that doesn't use namespaces, simply omit the namespace prefix as shown in the third CDataElement below.

Returns:
an Array of element descriptors or null

processClassDoc

void processClassDoc(com.sun.javadoc.ClassDoc classDoc,
                     ClassDocType classDocType)
Use this method to extend the provided ClassDocType with the information from the given ClassDoc.

Parameters:
classDoc - the class javadoc
classDocType - the ClassDocType to extend. This will later be processed by the WadlGenerators.

processMethodDoc

void processMethodDoc(com.sun.javadoc.MethodDoc methodDoc,
                      MethodDocType methodDocType)
Process the provided methodDoc and add your custom information to the methodDocType.
Use e.g. MethodDocType.getAny() to store custom elements.

Parameters:
methodDoc - the MethodDoc representing the docs of your method.
methodDocType - the related MethodDocType that will later be processed by the WadlGenerators.

processParamTag

void processParamTag(com.sun.javadoc.ParamTag paramTag,
                     com.sun.javadoc.Parameter parameter,
                     ParamDocType paramDocType)
Use this method to extend the provided ParamDocType with the information from the given ParamTag and Parameter.

Parameters:
paramTag - the parameter javadoc
parameter - the parameter (that is documented or not)
paramDocType - the ParamDocType to extend. This will later be processed by the WadlGenerators.


Copyright © 2013 Oracle Corporation. All Rights Reserved.