1 package xdoclet.sdk.beans;
2
3 import xdoclet.plugins.VelocityPlugin;
4 import xdoclet.util.predicates.And;
5 import xdoclet.util.predicates.HasClassTag;
6 import xdoclet.util.predicates.ReflectionPredicate;
7
8 /***
9 * Generates a <a href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Manifest%20Specification">MANIFEST.MF</a>
10 * file that registers XDoclet Java Beans.
11 *
12 * @bean.class name="Manifest"
13 * displayName="Manifest"
14 * shortDescription="Generates Manifest file for beans."
15 *
16 * @bean.attribute name="xdoclet-class" value="xdoclet.XDoclet"
17 *
18 * @author <a href="mailto:aslak.hellesoy at bekk.no">Aslak Hellesøy</a>
19 * @version $Revision: 1.3 $
20 */
21 public class ManifestPlugin extends VelocityPlugin {
22 public ManifestPlugin() {
23 // We don't want inner classes, classes should be public and not abstract.
24 And and = new And();
25
26 and.add(new ReflectionPredicate("!isInner"));
27 and.add(new ReflectionPredicate("!isAbstract"));
28 and.add(new ReflectionPredicate("isPublic"));
29 and.add(new HasClassTag("bean.class"));
30 createAccept().setPredicate(and);
31 setTemplatePath("xdoclet/sdk/beans/Manifest.vm");
32 setFileName("MANIFEST.MF");
33 }
34
35 public String getPathToClass(String className) {
36 return className.replace('.', '/');
37 }
38 }
This page was automatically generated by Maven