xdoclet
Class PluginFactory

java.lang.Object
  |
  +--xdoclet.PluginFactory

public final class PluginFactory
extends Object

This class is responsible for discovering pluggable components such as MetadataProviders and Plugins that are available on the classpath. In order to be discovered, these classes must be declared as Java Beans in their MANIFEST.MF file, and they must also be accompanied with a BeanInfo class.

BeanInfo classes can be generated automatically with the built-in BeanInfoPlugin.

Version:
$Revision: 1.16 $
Author:
Aslak Hellesøy

Constructor Summary
PluginFactory(ClasspathManager classpathManager)
          Constructs a new PluginFactory.
 
Method Summary
 MetadataProvider createMetadataProvider(String name, XDoclet xdoclet)
           
 Plugin createPlugin(String pluginName, XDoclet xdoclet)
          Creates a new plugin and attaches it to an XDoclet instance.
 ClasspathManager getClasspathManager()
          Gets that ClasspathManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginFactory

public PluginFactory(ClasspathManager classpathManager)
Constructs a new PluginFactory.

Parameters:
classpathManager - the classpathManager to use
Method Detail

getClasspathManager

public ClasspathManager getClasspathManager()
Gets that ClasspathManager.

Returns:
the ClasspathManager.

createPlugin

public final Plugin createPlugin(String pluginName,
                                 XDoclet xdoclet)
                          throws XDocletException
Creates a new plugin and attaches it to an XDoclet instance.

Parameters:
pluginName - the name of the plugin, as specified in xdoclet-plugin.xml
xdoclet - the XDoclet instance that will contain the created plugin
Returns:
the created plugin
Throws:
XDocletException - if there is no registered plugin for pluginName, or if the corresponding plugin is not allowed within the XDoclet instance. What XDoclet (sub)classes are allowed is declared in the plugin's deployment descriptor.

createMetadataProvider

public MetadataProvider createMetadataProvider(String name,
                                               XDoclet xdoclet)
                                        throws XDocletException
XDocletException


Copyright © 2000-2003 XDoclet Team. All Rights Reserved.