View Javadoc
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 BeanInfo classes for Java Beans. 10 * 11 * @bean.class name="beaninfo" 12 * displayName="beaninfo" 13 * shortDescription="Generates BeanInfo classes for beans." 14 * 15 * @bean.attribute name="xdoclet-class" value="xdoclet.XDoclet" 16 * 17 * @author <a href="mailto:aslak.hellesoy at bekk.no">Aslak Hellesøy</a> 18 * @author Laurent Etiemble (letiemble@users.sourceforge.net) 19 * @version $Revision: 1.3 $ 20 */ 21 public class BeanInfoPlugin extends VelocityPlugin { 22 public BeanInfoPlugin() { 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/BeanInfo.vm"); 32 setFileName("{0}BeanInfo.java"); 33 } 34 }

This page was automatically generated by Maven