org.apache.cocoon.components.source.impl
Class QDoxSource

java.lang.Object
  extended by org.apache.excalibur.source.impl.AbstractSource
      extended by org.apache.cocoon.components.source.impl.QDoxSource
All Implemented Interfaces:
Poolable, Recyclable, Source, XMLizable

public final class QDoxSource
extends AbstractSource
implements XMLizable, Recyclable

Source implementation for XML Javadoc.

Version:
$Id: QDoxSource.html 1304258 2012-03-23 10:09:27Z ilgrosso $ $Date: 2012-03-23 10:09:27 +0000 (Fri, 23 Mar 2012) $
Author:
Bart Guijt

Field Summary
protected static String ATTR_TYPE
           
protected static String CLASS_ELEMENT
           
protected static int CLASS_INHERITANCE
           
protected  Map classMap
           
protected static String CLASSNAME_ATTRIBUTE
           
protected static String COMMENT_ELEMENT
           
protected static String CONSTRUCTOR_ELEMENT
           
protected static int CONSTRUCTOR_INHERITANCE
           
protected static int CONSTRUCTOR_MODE
           
protected static String CONSTRUCTORS_ELEMENT
           
protected  com.thoughtworks.qdox.model.JavaClass containingJavadocClass
           
protected static String DIMENSIONS_ATTRIBUTE
           
protected static String EXCEPTION_ELEMENT
           
protected static String FIELD_ELEMENT
           
protected static int FIELD_INHERITANCE
           
protected static String FIELDS_ELEMENT
           
protected static String HREF_ATTRIBUTE
           
protected static String IMPLEMENTS_ELEMENT
           
protected static String IMPORT_ATTRIBUTE
           
protected static String IMPORT_ELEMENT
           
protected static String IMPORTS_ELEMENT
           
protected static String INHERIT_ELEMENT
           
protected static int INNERCLASS_INHERITANCE
           
protected static String INNERCLASSES_ELEMENT
           
protected static String INTERFACE_ELEMENT
           
protected static int INTERFACE_INHERITANCE
           
protected  com.thoughtworks.qdox.model.JavaClass javadocClass
           
protected  String javadocClassName
           
protected  String javadocUri
           
protected  Source javaSource
           
protected static String LINK_CLASS_ATTRIBUTE
           
protected static String LINK_ELEMENT
           
protected static String LINK_MEMBER_ATTRIBUTE
           
protected  Logger logger
           
protected  ServiceManager manager
           
protected static String METHOD_ELEMENT
           
protected static int METHOD_INHERITANCE
           
protected static int METHOD_MODE
           
protected static String METHODS_ELEMENT
           
protected static String MODIFIERS_ELEMENT
           
protected static String NAME_ATTRIBUTE
           
protected static String NESTED_IN_ELEMENT
           
protected static String NS_PREFIX
           
protected static String NS_URI
           
protected static String PACKAGE_ATTRIBUTE
           
protected static String PARAMETER_ELEMENT
           
protected static String PARAMETERS_ELEMENT
           
protected static String PROTOCOL
           
protected static String QNAME_ATTRIBUTE
           
protected static String RE_LINK
          Contains a regular expression to match the {@link …} occurrances.
protected  org.apache.regexp.RE reLink
          This RegExp matches the {@link …} occurrances in Javadoc comments.
protected static String ROOT_CLASSNAME
           
protected static String SIGNATURE_ATTRIBUTE
           
protected static String TAGS_ELEMENT
           
protected static String THROWS_ELEMENT
           
protected static String TYPE_ATTRIBUTE
           
 
Constructor Summary
QDoxSource(String location, Source javaSource, Logger logger, ServiceManager manager)
          Constructor for QDoxSource.
 
Method Summary
protected  void createJavadocXml()
           
 boolean exists()
           
 long getContentLength()
          Get the content length of the source or -1 if it is not possible to determine the length.
 InputStream getInputStream()
           
 com.thoughtworks.qdox.model.JavaClass getJavadocClass()
          Returns the parsed Java class.
 long getLastModified()
           
 String getMimeType()
           
 String getURI()
          Return the unique identifer for this source
 SourceValidity getValidity()
           
 void recycle()
           
 void toSAX(ContentHandler handler)
           
 
Methods inherited from class org.apache.excalibur.source.impl.AbstractSource
checkInfos, getInfos, getScheme, refresh, setContentLength, setLastModified, setScheme, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_CLASSNAME

protected static final String ROOT_CLASSNAME
See Also:
Constant Field Values

PROTOCOL

protected static final String PROTOCOL
See Also:
Constant Field Values

NS_URI

protected static final String NS_URI
See Also:
Constant Field Values

NS_PREFIX

protected static final String NS_PREFIX
See Also:
Constant Field Values

ATTR_TYPE

protected static final String ATTR_TYPE
See Also:
Constant Field Values

CLASS_ELEMENT

protected static final String CLASS_ELEMENT
See Also:
Constant Field Values

CLASSNAME_ATTRIBUTE

protected static final String CLASSNAME_ATTRIBUTE
See Also:
Constant Field Values

PACKAGE_ATTRIBUTE

protected static final String PACKAGE_ATTRIBUTE
See Also:
Constant Field Values

QNAME_ATTRIBUTE

protected static final String QNAME_ATTRIBUTE
See Also:
Constant Field Values

INHERIT_ELEMENT

protected static final String INHERIT_ELEMENT
See Also:
Constant Field Values

INNERCLASSES_ELEMENT

protected static final String INNERCLASSES_ELEMENT
See Also:
Constant Field Values

NESTED_IN_ELEMENT

protected static final String NESTED_IN_ELEMENT
See Also:
Constant Field Values

IMPORTS_ELEMENT

protected static final String IMPORTS_ELEMENT
See Also:
Constant Field Values

IMPORT_ELEMENT

protected static final String IMPORT_ELEMENT
See Also:
Constant Field Values

IMPORT_ATTRIBUTE

protected static final String IMPORT_ATTRIBUTE
See Also:
Constant Field Values

IMPLEMENTS_ELEMENT

protected static final String IMPLEMENTS_ELEMENT
See Also:
Constant Field Values

INTERFACE_ELEMENT

protected static final String INTERFACE_ELEMENT
See Also:
Constant Field Values

MODIFIERS_ELEMENT

protected static final String MODIFIERS_ELEMENT
See Also:
Constant Field Values

COMMENT_ELEMENT

protected static final String COMMENT_ELEMENT
See Also:
Constant Field Values

LINK_ELEMENT

protected static final String LINK_ELEMENT
See Also:
Constant Field Values

LINK_CLASS_ATTRIBUTE

protected static final String LINK_CLASS_ATTRIBUTE
See Also:
Constant Field Values

LINK_MEMBER_ATTRIBUTE

protected static final String LINK_MEMBER_ATTRIBUTE
See Also:
Constant Field Values

HREF_ATTRIBUTE

protected static final String HREF_ATTRIBUTE
See Also:
Constant Field Values

TAGS_ELEMENT

protected static final String TAGS_ELEMENT
See Also:
Constant Field Values

FIELDS_ELEMENT

protected static final String FIELDS_ELEMENT
See Also:
Constant Field Values

FIELD_ELEMENT

protected static final String FIELD_ELEMENT
See Also:
Constant Field Values

CONSTRUCTORS_ELEMENT

protected static final String CONSTRUCTORS_ELEMENT
See Also:
Constant Field Values

CONSTRUCTOR_ELEMENT

protected static final String CONSTRUCTOR_ELEMENT
See Also:
Constant Field Values

METHODS_ELEMENT

protected static final String METHODS_ELEMENT
See Also:
Constant Field Values

METHOD_ELEMENT

protected static final String METHOD_ELEMENT
See Also:
Constant Field Values

NAME_ATTRIBUTE

protected static final String NAME_ATTRIBUTE
See Also:
Constant Field Values

TYPE_ATTRIBUTE

protected static final String TYPE_ATTRIBUTE
See Also:
Constant Field Values

DIMENSIONS_ATTRIBUTE

protected static final String DIMENSIONS_ATTRIBUTE
See Also:
Constant Field Values

SIGNATURE_ATTRIBUTE

protected static final String SIGNATURE_ATTRIBUTE
See Also:
Constant Field Values

PARAMETERS_ELEMENT

protected static final String PARAMETERS_ELEMENT
See Also:
Constant Field Values

PARAMETER_ELEMENT

protected static final String PARAMETER_ELEMENT
See Also:
Constant Field Values

THROWS_ELEMENT

protected static final String THROWS_ELEMENT
See Also:
Constant Field Values

EXCEPTION_ELEMENT

protected static final String EXCEPTION_ELEMENT
See Also:
Constant Field Values

CONSTRUCTOR_MODE

protected static final int CONSTRUCTOR_MODE
See Also:
Constant Field Values

METHOD_MODE

protected static final int METHOD_MODE
See Also:
Constant Field Values

CLASS_INHERITANCE

protected static final int CLASS_INHERITANCE
See Also:
Constant Field Values

INTERFACE_INHERITANCE

protected static final int INTERFACE_INHERITANCE
See Also:
Constant Field Values

INNERCLASS_INHERITANCE

protected static final int INNERCLASS_INHERITANCE
See Also:
Constant Field Values

FIELD_INHERITANCE

protected static final int FIELD_INHERITANCE
See Also:
Constant Field Values

CONSTRUCTOR_INHERITANCE

protected static final int CONSTRUCTOR_INHERITANCE
See Also:
Constant Field Values

METHOD_INHERITANCE

protected static final int METHOD_INHERITANCE
See Also:
Constant Field Values

manager

protected ServiceManager manager

logger

protected Logger logger

javaSource

protected Source javaSource

javadocUri

protected String javadocUri

javadocClassName

protected String javadocClassName

javadocClass

protected com.thoughtworks.qdox.model.JavaClass javadocClass

containingJavadocClass

protected com.thoughtworks.qdox.model.JavaClass containingJavadocClass

classMap

protected Map classMap

reLink

protected org.apache.regexp.RE reLink
This RegExp matches the {@link …} occurrances in Javadoc comments.


RE_LINK

protected static final String RE_LINK
Contains a regular expression to match the {@link …} occurrances.

The following {@link …} literals are recognized:

The regexp is as follows:

\{\@link\s+((([\w.#,$&;\s]+)|([\w.#,$&;(\s]+[\w.#,$&;)\s]+))\s+([\w()#.,$&;\s]+)|([\w.#,$&;\s()]+))\s*\}

See Also:
reLink, Constant Field Values
Constructor Detail

QDoxSource

public QDoxSource(String location,
                  Source javaSource,
                  Logger logger,
                  ServiceManager manager)
Constructor for QDoxSource.

Parameters:
location -
javaSource -
logger -
manager -
Method Detail

getJavadocClass

public com.thoughtworks.qdox.model.JavaClass getJavadocClass()
Returns the parsed Java class.

Returns:
JavaClass

toSAX

public void toSAX(ContentHandler handler)
           throws SAXException
Specified by:
toSAX in interface XMLizable
Throws:
SAXException - if any error occurs during SAX outputting.
See Also:
XMLizable.toSAX(org.xml.sax.ContentHandler)

recycle

public void recycle()
Specified by:
recycle in interface Recyclable
See Also:
Recyclable.recycle()

getContentLength

public long getContentLength()
Get the content length of the source or -1 if it is not possible to determine the length.

Specified by:
getContentLength in interface Source
Overrides:
getContentLength in class AbstractSource

getLastModified

public long getLastModified()
Specified by:
getLastModified in interface Source
Overrides:
getLastModified in class AbstractSource
See Also:
Source.getLastModified()

getMimeType

public String getMimeType()
Specified by:
getMimeType in interface Source
Overrides:
getMimeType in class AbstractSource
See Also:
Source.getMimeType()

getURI

public String getURI()
Return the unique identifer for this source

Specified by:
getURI in interface Source
Overrides:
getURI in class AbstractSource

getValidity

public SourceValidity getValidity()
Specified by:
getValidity in interface Source
Overrides:
getValidity in class AbstractSource
See Also:
Source.getValidity()

getInputStream

public InputStream getInputStream()
                           throws IOException,
                                  SourceException
Specified by:
getInputStream in interface Source
Overrides:
getInputStream in class AbstractSource
Throws:
IOException
SourceException
See Also:
Source.getInputStream()

createJavadocXml

protected void createJavadocXml()
                         throws SourceException,
                                IOException
Throws:
SourceException
IOException

exists

public boolean exists()
Specified by:
exists in interface Source
See Also:
Source.exists()


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.