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

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.source.impl.QDoxSourceFactory
All Implemented Interfaces:
Configurable, LogEnabled, Serviceable, ThreadSafe, SourceFactory

public final class QDoxSourceFactory
extends AbstractLogEnabled
implements SourceFactory, Serviceable, Configurable, ThreadSafe

This SourceFactory creates Sources for the javadoc: URI scheme.

The goal for this SourceFactory is to provide a Source for a Java sourcefile containing as much information as possible to mimic the standard Javadoc output.

The Source provides the following content:

With this SourceFactory, you create Doclets with XSLT stylesheets instead of Java code.

The QDoxSourceFactory uses QDox to parse the Java sourcefiles.

Version:
CVS $Id: QDoxSourceFactory.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Bart Guijt

Nested Class Summary
protected static class QDoxSourceFactory.SourceRoot
          Represents an URI and which packages it contains.
 
Field Summary
protected static String GROUP_ATTRIBUTE
           
protected static String INCLUDE_INHERITANCE_ELEMENT
           
protected  ServiceManager manager
           
protected  org.apache.regexp.RE rePackageClass
          RegExp matcher for Java classnames: distinguishes package and classname.
protected  org.apache.regexp.RE rePackageClassInnerclass
          RegExp matcher for Java classnames: distinguishes package, classname and innerclassname.
protected static String SOURCE_GROUP_ELEMENT
           
protected static String SOURCE_ROOT_ELEMENT
           
protected  List sourceRootUris
           
protected static String URI_ATTRIBUTE
           
protected static String VALUE_ATTRIBUTE
           
 
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
 
Constructor Summary
QDoxSourceFactory()
           
 
Method Summary
 void configure(Configuration config)
           
 Source getSource(String location, Map parameters)
           
 void release(Source source)
          Releases the specified Source.
 void service(ServiceManager manager)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INCLUDE_INHERITANCE_ELEMENT

protected static final String INCLUDE_INHERITANCE_ELEMENT
See Also:
Constant Field Values

VALUE_ATTRIBUTE

protected static final String VALUE_ATTRIBUTE
See Also:
Constant Field Values

SOURCE_GROUP_ELEMENT

protected static final String SOURCE_GROUP_ELEMENT
See Also:
Constant Field Values

GROUP_ATTRIBUTE

protected static final String GROUP_ATTRIBUTE
See Also:
Constant Field Values

SOURCE_ROOT_ELEMENT

protected static final String SOURCE_ROOT_ELEMENT
See Also:
Constant Field Values

URI_ATTRIBUTE

protected static final String URI_ATTRIBUTE
See Also:
Constant Field Values

manager

protected ServiceManager manager

sourceRootUris

protected List sourceRootUris

rePackageClass

protected org.apache.regexp.RE rePackageClass
RegExp matcher for Java classnames: distinguishes package and classname.


rePackageClassInnerclass

protected org.apache.regexp.RE rePackageClassInnerclass
RegExp matcher for Java classnames: distinguishes package, classname and innerclassname.

Constructor Detail

QDoxSourceFactory

public QDoxSourceFactory()
Method Detail

getSource

public Source getSource(String location,
                        Map parameters)
                 throws MalformedURLException,
                        IOException,
                        SourceException
Specified by:
getSource in interface SourceFactory
Throws:
MalformedURLException
IOException
SourceException
See Also:
SourceFactory.getSource(java.lang.String, java.util.Map)

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

configure

public void configure(Configuration config)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)

release

public void release(Source source)
Releases the specified Source.

Specified by:
release in interface SourceFactory
See Also:
SourceFactory.release(org.apache.excalibur.source.Source)


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