AnnotationRequired.java

  1. package org.jbehave.core.configuration;

  2. import java.lang.annotation.Annotation;

  3. /**
  4.  * Thrown when an annotation is required and not found.
  5.  */
  6. @SuppressWarnings("serial")
  7. public class AnnotationRequired extends RuntimeException {

  8.     /**
  9.      * Used when an annotation is required and not found
  10.      *
  11.      * @param annotatedClass the annotated Class
  12.      * @param missingAnnotation the missing Annotation class
  13.      */
  14.     public AnnotationRequired(Class<?> annotatedClass,
  15.             Class<? extends Annotation> missingAnnotation) {
  16.         super(annotatedClass + " requires to be annotated by " + missingAnnotation + ".");
  17.     }

  18. }