xdoclet
Interface MetadataProvider

All Known Implementing Classes:
BuildXmlMetadataProvider, XJavadocMetadataProvider

public interface MetadataProvider

An abstraction layer for metadata. A MetadataProvider object provides a Collection of objects to use during code generation, and also defines some necessary methods for accessing additional information like package name and the String to replace in {0} style destination file names.

This makes it possible to use other sources/APIs than xjavadoc to provide metadata that a plugin requires.

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

Method Summary
 void cleanup()
          Frees any resources and does any other necessary work before shutting down.
 Collection createMetadataCollection()
          Returns a Collection of objects that should be used as basis for code generation.
 String getFilenameSubstitutionValue(Object o)
          Returns the string that will be replaced in the {0} part of the file name.
 String getPackageName(Object o)
          Returns the package name that will be used to determine the file name.
 void setClasspath(String classpath)
          Sets the classpath.
 

Method Detail

createMetadataCollection

public Collection createMetadataCollection()
                                    throws XDocletException
Returns a Collection of objects that should be used as basis for code generation. It's up to the Plugins to handle the elements in the Collection. Special Plugins will expect the elements in the Collection to be of a certain type.

Returns:
Collection of arbitrary objects
XDocletException

getFilenameSubstitutionValue

public String getFilenameSubstitutionValue(Object o)
                                    throws XDocletException
Returns the string that will be replaced in the {0} part of the file name.

Parameters:
o - the object the substitution string should be derived from.
Returns:
the substitution string.
XDocletException

getPackageName

public String getPackageName(Object o)
Returns the package name that will be used to determine the file name.

Parameters:
o - the object from which the package name is derived.
Returns:
the package name to use for o.

cleanup

public void cleanup()
             throws XDocletException
Frees any resources and does any other necessary work before shutting down.

XDocletException

setClasspath

public void setClasspath(String classpath)
                  throws XDocletException
Sets the classpath. This is useful for some implementations that need to load additional classes or resources from the classpath.

XDocletException


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