1 package xdoclet;
2
3 import java.util.Collection;
4
5 /***
6 * An abstraction layer for metadata. A MetadataProvider object provides a
7 * Collection of objects to use during code generation, and also defines
8 * some necessary methods for accessing additional information like package
9 * name and the String to replace in {0} style destination file names.
10 *
11 * <p>This makes it possible to use other sources/APIs than xjavadoc to provide
12 * metadata that a plugin requires.</p>
13 *
14 * @author <a href="mailto:aslak.hellesoy at bekk.no">Aslak Hellesøy</a>
15 * @version $Revision: 1.10 $
16 */
17 public interface MetadataProvider {
18 /***
19 * Returns a Collection of objects that should be used as basis for code generation.
20 * It's up to the Plugins to handle the elements in the Collection. Special Plugins
21 * will expect the elements in the Collection to be of a certain type.
22 *
23 * @return Collection of arbitrary objects
24 */
25 Collection createMetadataCollection() throws XDocletException;
26
27 /***
28 * Returns the string that will be replaced in the {0} part of the file
29 * name.
30 *
31 * @param o the object the substitution string should be derived from.
32 * @return the substitution string.
33 */
34 String getFilenameSubstitutionValue(Object o) throws XDocletException;
35
36 /***
37 * Returns the package name that will be used to determine the file
38 * name.
39 *
40 * @param o the object from which the package name is derived.
41 * @return the package name to use for o.
42 */
43 String getPackageName(Object o);
44
45 /***
46 * Frees any resources and does any other necessary work before shutting down.
47 */
48 void cleanup() throws XDocletException;
49
50 /***
51 * Sets the classpath. This is useful for some implementations that need
52 * to load additional classes or resources from the classpath.
53 */
54 void setClasspath( String classpath ) throws XDocletException;
55 }
This page was automatically generated by Maven