FileDocCategorySizeDatePackage
Review.javaAPI DocExample635Wed Apr 20 15:00:54 BST 2005None

Review.java

import java.lang.annotation.*;

/**
 * An annotation of this type represents a single code review of the
 * annotated element.  Every review must specify the name of the reviewer
 * and the grade assigned to the code.  Optionally, reviews may also include
 * a comment string.
 */
public @interface Review {
    // Nested enumerated type
    public static enum Grade { EXCELLENT, SATISFACTORY, UNSATISFACTORY };

    // These methods define the annotation members
    Grade grade();                // member named "grade" with type Grade
    String reviewer();          
    String comment() default "";  // Note default value here.
}