Package org.jboss.deployers.spi.annotations

Examples of org.jboss.deployers.spi.annotations.AnnotationEnvironment.classHasFieldAnnotatedWith()


            classes.add(elt.getOwner());
      }
      for(Class<? extends Annotation> annotation : annotationOnField)
      {
         Class<Annotation> annotationClass = (Class<Annotation>)annotation;
         Set<Element<Annotation, Field>> elements = env.classHasFieldAnnotatedWith(annotationClass);
         for(Element<Annotation, Field> elt : elements)
            classes.add(elt.getOwner());
      }

      if(log.isTraceEnabled() && classes.isEmpty() == false)
View Full Code Here


      if (trace)
         log.trace("Creator: " + creatorInfo + ", field annotations: " + fieldAnnotations);
      for(Class<? extends Annotation> annotation : fieldAnnotations)
      {
         Class<Annotation> annotationClass = (Class<Annotation>)annotation;
         Set<Element<Annotation, Field>> elements = env.classHasFieldAnnotatedWith(annotationClass);
         for(Element<Annotation, Field> elt : elements)
            classes.add(elt.getOwner());
      }

      if (trace)
View Full Code Here

      Set methods = env.classHasMethodAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.Marked");
      assertNotNull(methods);
      assertEquals(onMethod, methods.size());

      Set fields = env.classHasFieldAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.Marked");
      assertNotNull(fields);
      assertEquals(onFiled, fields.size());
   }

   protected AssembledDirectory createTopLevelWithUtil() throws Exception
View Full Code Here

         Annotation ta = ec.getAnnotation();
         assertNotNull(ta);
         assertEquals("constructor", getValue(ta));
         assertInstanceOf(ec.getAnnotatedElement(), Constructor.class, false);

         Element<TestAnnotation, Field> ef = getSingleton(env.classHasFieldAnnotatedWith(taClass));
         ta = ef.getAnnotation();
         assertNotNull(ta);
         assertEquals("field", getValue(ta));
         assertInstanceOf(ef.getAnnotatedElement(), Field.class, false);
View Full Code Here

         Annotation ta = ec.getAnnotation();
         assertNotNull(ta);
         assertEquals("constructor", getValue(ta));
         assertInstanceOf(ec.getAnnotatedElement(), Constructor.class, false);

         Element<Annotation, Field> ef = getSingleton(env.classHasFieldAnnotatedWith(annotationName));
         ta = ef.getAnnotation();
         assertNotNull(ta);
         assertEquals("field", getValue(ta));
         assertInstanceOf(ef.getAnnotatedElement(), Field.class, false);
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.