Package java.lang.annotation

Examples of java.lang.annotation.Annotation.annotationType()


      if (annotations != null)
      {
         for (AnnotationItem item : annotations)
         {
            Annotation a = item.getAnnotation();
            if (annotationType.equals(a.annotationType()))
               return item;
         }
      }
     
      return null;
View Full Code Here


      for (AnnotationItem<? extends Annotation> item : items)
      {
         assertNotNull("Null annotation item " + Arrays.asList(items), item);
         Annotation annotation = item.getAnnotation();
         assertNotNull("Null annotation " + Arrays.asList(items), annotation);
         actual.add(annotation.annotationType());
      }
     
      assertExpectedAnnotations("Annotations", expected, actual);
   }
  
View Full Code Here

      for (AnnotationItem<? extends Annotation> item : items)
      {
         assertNotNull("Null annotation item " + Arrays.asList(items), item);
         Annotation annotation = item.getAnnotation();
         assertNotNull("Null annotation " + Arrays.asList(items), annotation);
         actual.add(annotation.annotationType());
      }
     
      assertExpectedAnnotations("Annotations", expected, actual);
   }
  
View Full Code Here

      for (Object object : result)
      {
         assertNotNull("Null annotation " + Arrays.asList(result), object);
         assertTrue("Not an annotation " + Arrays.asList(result), object instanceof Annotation);
         Annotation annotation = (Annotation) object;
         actual.add(annotation.annotationType());
      }
     
      assertExpectedAnnotations("AnnotationMetaDatas", expected, actual);
   }
  
View Full Code Here

      for (Object object : result)
      {
         assertNotNull("Null annotation " + Arrays.asList(result), object);
         assertTrue("Not an annotation " + Arrays.asList(result), object instanceof Annotation);
         Annotation annotation = (Annotation) object;
         actual.add(annotation.annotationType());
      }
     
      assertExpectedAnnotations("AnnotationMetaDatas", expected, actual);
   }
  
View Full Code Here

         assertNotNull("Null item " + Arrays.asList(items), item);
         Object object = item.getValue();
         assertNotNull("Null object " + Arrays.asList(items), object);
         assertTrue("Not an annotation " + Arrays.asList(items), object instanceof Annotation);
         Annotation annotation = (Annotation) object;
         actual.add(annotation.annotationType());
      }
     
      assertExpectedAnnotations("AnnotationMetaDatas", expected, actual);
   }
  
View Full Code Here

         assertNotNull("Null item " + Arrays.asList(items), item);
         Object object = item.getValue();
         assertNotNull("Null object " + Arrays.asList(items), object);
         assertTrue("Not an annotation " + Arrays.asList(items), object instanceof Annotation);
         Annotation annotation = (Annotation) object;
         actual.add(annotation.annotationType());
      }
     
      assertExpectedAnnotations("AnnotationMetaDatas", expected, actual);
   }
  
View Full Code Here

         return true;
      if (object == null || object instanceof Annotation == false)
         return false;
     
      Annotation other = (Annotation) object;
      return annotationType.equals(other.annotationType());
   }
  
   public int hashCode()
   {
      return annotationType.hashCode();
View Full Code Here

            }
            else
            {
               annotation = new PostConstructImpl();
            }
            annotationClass = annotation.annotationType();
            method.setMethodName("ejbCreate");
            addAnnotations(annotationClass, annotation, container, method);
         }

         annotation = new PostActivateImpl();
View Full Code Here

  }

  public boolean isElementType(final WiringElementType type, final HasAnnotations hasAnnotations) {
    final Annotation matchingAnnotation = getMatchingAnnotationForElementType(type, hasAnnotations);
    if (matchingAnnotation != null && type == WiringElementType.NotSupported) {
      log.error(hasAnnotations + " was annotated with " + matchingAnnotation.annotationType().getName()
          + " which is not supported in client-side Errai code!");
    }

    return matchingAnnotation != null;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.