Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.AnnotationValue


        
         if (superHolder != null && superAllAnnotations != null && superAllAnnotations.length != 0)
         {
            for (int i = 0; i < superAllAnnotations.length; i++)
            {
               AnnotationValue av = superAllAnnotations[i];
               if (av.getAnnotationType().isAnnotationPresent("java.lang.annotation.Inherited"));
                  allAnnotations.put(av.getAnnotationType().getName(), av);
            }
         }
         else
            allAnnotationsArray = declaredAnnotationsArray;
View Full Code Here


      catch (RuntimeException e)
      {
         // AutoGenerated
         throw new RuntimeException("Error creating annotation for " + clazz.getName(), e);
      }
      AnnotationValue value = AnnotationValueFactory.createAnnotationValue(helper, helper, info, annotation);
      getDependenciesForAnnotation(info.getName(), value, dependencies);
   }
View Full Code Here

         if (superHolder != null && superAllAnnotations != null && superAllAnnotations.length != 0)
         {
            for (int i = 0; i < superAllAnnotations.length; i++)
            {
               AnnotationValue av = superAllAnnotations[i];
               if (av.getAnnotationType().isAnnotationPresent(INHERITED_NAME))
               {
                  allAnnotations.put(av.getAnnotationType().getName(), av);
               }
            }
         }
         else
            allAnnotationsArray = annotationsArray;
View Full Code Here

   public boolean equals(Object o)
   {
      if (this == o) return true;
      if (o == null || !(o instanceof AnnotationValue)) return false;

      final AnnotationValue annotationValue = (AnnotationValue) o;

      if (!annotationType.equals(annotationValue.getAnnotationType())) return false;
      if (!attributeValues.equals(annotationValue.getValues())) return false;

      Annotation otherUnderlying = annotationValue.getUnderlyingAnnotation();
      if (underlying == null && otherUnderlying != null)
         return false;
      if (underlying != null && otherUnderlying == null)
         return false;
      return underlying.equals(otherUnderlying);
View Full Code Here

        
         if (superHolder != null && superAllAnnotations != null && superAllAnnotations.length != 0)
         {
            for (int i = 0; i < superAllAnnotations.length; i++)
            {
               AnnotationValue av = superAllAnnotations[i];
               if (av.getAnnotationType().isAnnotationPresent(INHERITED_NAME))
               {
                  allAnnotations.put(av.getAnnotationType().getName(), av);
               }
            }
         }
         else
            allAnnotationsArray = declaredAnnotationsArray;
View Full Code Here

   public <T extends Annotation> T getUnderlyingAnnotation(Class<T> annotationType)
   {
      if (annotationType == null)
         throw new IllegalArgumentException("Null annotationType");
      AnnotationValue value = getAnnotation(annotationType.getName());
      if (value == null)
         return null;
      return value.getUnderlyingAnnotation(annotationType);
   }
View Full Code Here

      ClassInfo info = getClassInfo(AnnotatedSubClass.class);

      System.out.println("---> Getting annotations");
      AnnotationValue[] annotations = info.getAnnotations();
      assertEquals(2, annotations.length);
      AnnotationValue anotherAnnotation = getAnnotationCheckTypeAndName(info, AnotherAnnotation.class.getName());
      AnnotationValue simpleAnnotation = getAnnotationCheckTypeAndName(info, SimpleAnnotation.class.getName());
     
      HashSet<AnnotationValue> set = new HashSet<AnnotationValue>();
      set.add(anotherAnnotation);
      set.add(simpleAnnotation);
     
View Full Code Here

      assertFalse(info.isAnnotationPresent(SimpleAnnotation.class.getName()));
     
      ClassInfo componentInfo = (ClassInfo)((ArrayInfo)info).getComponentType();
      AnnotationValue[] annotations = componentInfo.getAnnotations();
      assertEquals(2, annotations.length);
      AnnotationValue anotherAnnotation = getAnnotationCheckTypeAndName(componentInfo, AnotherAnnotation.class.getName());
      AnnotationValue simpleAnnotation = getAnnotationCheckTypeAndName(componentInfo, SimpleAnnotation.class.getName());
     
      HashSet<AnnotationValue> set = new HashSet<AnnotationValue>();
      set.add(anotherAnnotation);
      set.add(simpleAnnotation);
     
View Full Code Here

      checkComplexAnnotation(info, expectedComplexAnnotationData);
   }
  
   private void checkSimpleAnnotation(AnnotatedInfo info)
   {
      AnnotationValue annotation = getAnnotationCheckTypeAndName(info, SimpleAnnotation.class.getName());

      AnnotationValue[] annotationAnns = annotation.getAnnotationType().getAnnotations();
      assertNotNull(annotationAnns);
      checkExpectedAnnotations(annotationAnns, ANNOTATION_EXPECTED_ANNOTATIONS);
   }
View Full Code Here

      checkExpectedAnnotations(annotationAnns, ANNOTATION_EXPECTED_ANNOTATIONS);
   }

   private void checkComplexAnnotation(AnnotatedInfo info, ExpectedComplexAnnotationData expectedComplexAnnotationData)
   {
      AnnotationValue complexAnnotation = getAnnotationCheckTypeAndName(info, ComplexAnnotation.class.getName());
      checkComplexAnnotation(complexAnnotation, expectedComplexAnnotationData);
   }  
View Full Code Here

TOP

Related Classes of org.jboss.reflect.spi.AnnotationValue

Copyright © 2018 www.massapicom. 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.