Class AnnotationExamples

java.lang.Object
net.jrodolfo.java_evolution.java05.AnnotationExamples

public class AnnotationExamples extends Object
Demonstrates annotations, introduced in Java 5.
  • Constructor Details

    • AnnotationExamples

      public AnnotationExamples()
  • Method Details

    • labelFor

      public String labelFor(String methodName) throws NoSuchMethodException
      Reads runtime annotation metadata from a method.
      Parameters:
      methodName - method to inspect
      Returns:
      the example label stored in the annotation
      Throws:
      NoSuchMethodException - if the method is missing