Code example for Annotation

Methods: annotationType

   private boolean equals(Object proxy, Object[] list) throws Throwable {
      Annotation left = (Annotation) proxy;
      Annotation right = (Annotation) list[0];
      if(left.annotationType() != right.annotationType()) {
         throw new PersistenceException("Annotation %s is not the same as %s", left, right);
      return comparer.equals(left, right);
    * This is used to build a string from the annotation. The string 
    * produces adheres to the typical string representation of a 
    * normal annotation. This ensures that an exceptions that are 
    * thrown with a string representation of the annotation are 
    * identical to those thrown with a normal annotation. 
    * @return returns a string representation of the annotation