Class JAnnotationType

java.lang.Object
org.exolab.javasource.JType
org.exolab.javasource.JStructure
org.exolab.javasource.JAnnotationType
All Implemented Interfaces:
JAnnotatedElement

public final class JAnnotationType extends JStructure
Describes the definition of a annotation type class.
   JAnnotationType type = new JAnnotationType("RequestForEnhancement");
   type.addElement(new JAnnotationTypeElement("id", JType.Int));
   type.addElement(new JAnnotationTypeElement("synopsis", new JType("String")));
   JAnnotationTypeElement engineer;
   engineer = new JAnnotationTypeElement("engineer", new JType("String"));
   engineer.setDefaultString("\"[unassigned]\"");
   type.addElement(engineer);
   JAnnotationTypeElement date;
   date = new JAnnotationTypeElement("date", new JType("String"));
   date.setDefaultString("\"[unimplemented]\"");
   type.addElement(date);
 
outputs
   public @interface RequestForEnhancement {
       int id();
       String synopsis();
       String engineer() default "[unassigned]";
       String date() default "[unimplemented]";
   }
 
Version:
$Revision: 8130 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
Author:
Andrew Fawcett