package com.webucator.test;
import java.lang.annotation.Annotation;

@ReportAnnotation(displayText="Detail line for report", reportOnWednesday=true)
public class TestAnnotation {
  
  public static void main(String[] args) {
    Class<TestAnnotation> testExample=TestAnnotation.class;
    Annotation annotation=testExample.getAnnotation(ReportAnnotation.class);
    ReportAnnotation reportAnnotation=(ReportAnnotation) annotation;
    String textToDisplay=reportAnnotation.displayText();
    boolean displayWednesday = reportAnnotation.reportOnWednesday();
    if (displayWednesday) {
      System.out.println(textToDisplay + " for Wednesday");
    }
    else {
      System.out.println(textToDisplay + " for week days except Wednesday");
    }
  }	
}