Examples of classIsAnnotatedWith()


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

      Set<Class<?>> classes = new HashSet<Class<?>>();
      for(Class<? extends Annotation> annotation : annotationOnClass)
      {
         Class<Annotation> annotationClass = (Class<Annotation>)annotation;
         Set<Element<Annotation, Class<?>>> elements = env.classIsAnnotatedWith(annotationClass);
         for(Element<Annotation, Class<?>> elt : elements)
            classes.add(elt.getOwner());
      }
      for(Class<? extends Annotation> annotation : annotationOnMethod)
      {
View Full Code Here

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

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

      Collection<Class<? extends Annotation>> methodAnnotations = context.getMethodAnnotations();
View Full Code Here

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

      assertEar(unit);
      try
      {
         AnnotationEnvironment env = unit.getAttachment(AnnotationEnvironment.class);
         assertNotNull(env);
         Set<Element<Annotation, Class<?>>> annotations = env.classIsAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.MarkedAnnotation");
         assertNotNull(annotations);
         assertEquals(1, annotations.size());

         DeploymentUnit jarUnit = assertChild(unit, "simple.jar");
         assertJar(jarUnit);
View Full Code Here

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

   protected void assertAnnotations(DeploymentUnit unit, int onClass, int onMethod, int onFiled)
   {
      AnnotationEnvironment env = unit.getAttachment(AnnotationEnvironment.class);
      assertNotNull(env);

      Set classes = env.classIsAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.Marked");
      assertNotNull(classes);
      assertEquals(onClass, classes.size());

      Set methods = env.classHasMethodAnnotatedWith("org.jboss.test.deployers.vfs.annotations.support.Marked");
      assertNotNull(methods);
View Full Code Here

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

         assertNotLoaded(unit, "org.jboss.test.deployers.annotations.support.AnnotationsHolder");
         // annotations are loaded, OK?
         assertLoaded(unit, "org.jboss.test.deployers.annotations.support.TestAnnotation");

         AnnotationEnvironment env = getAnnotationEnvironment(unit);
         Set<Element<TestAnnotation, Class<?>>> classes = env.classIsAnnotatedWith(taClass);
         assertNotNull(classes);
         assertEquals(1, classes.size());
         assertEquals(AnnotationsHolder.class.getName(), classes.iterator().next().getOwnerClassName());
         assertNotLoaded(unit, "org.jboss.test.deployers.annotations.support.AnnotationsHolder");
View Full Code Here

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

         assertNotNull(classes);
         assertEquals(1, classes.size());
         assertEquals(AnnotationsHolder.class.getName(), classes.iterator().next().getOwnerClassName());
         assertNotLoaded(unit, "org.jboss.test.deployers.annotations.support.AnnotationsHolder");

         Element<TestAnnotation, Class<?>> ecl = getSingleton(env.classIsAnnotatedWith(taClass));
         Annotation tacl = ecl.getAnnotation();
         assertNotNull(tacl);
         assertEquals("class", getValue(tacl));

         Element<TestAnnotation, Constructor<?>> ec = getSingleton(env.classHasConstructorAnnotatedWith(taClass));
View Full Code Here

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

         assertNotLoaded(unit, "org.jboss.test.deployers.annotations.support.AnnotationsHolder");
         // annotations are loaded, OK?
         assertLoaded(unit, "org.jboss.test.deployers.annotations.support.TestAnnotation");

         AnnotationEnvironment env = getAnnotationEnvironment(unit);
         Set<Element<Annotation, Class<?>>> classes = env.classIsAnnotatedWith(annotationName);
         assertNotNull(classes);
         assertEquals(1, classes.size());
         assertEquals(AnnotationsHolder.class.getName(), classes.iterator().next().getOwnerClassName());
         assertNotLoaded(unit, "org.jboss.test.deployers.annotations.support.AnnotationsHolder");
View Full Code Here

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

         assertNotNull(classes);
         assertEquals(1, classes.size());
         assertEquals(AnnotationsHolder.class.getName(), classes.iterator().next().getOwnerClassName());
         assertNotLoaded(unit, "org.jboss.test.deployers.annotations.support.AnnotationsHolder");

         Element<Annotation, Class<?>> ecl = getSingleton(env.classIsAnnotatedWith(annotationName));
         Annotation tacl = ecl.getAnnotation();
         assertNotNull(tacl);
         assertEquals("class", getValue(tacl));

         Element<Annotation, Constructor<?>> ec = getSingleton(env.classHasConstructorAnnotatedWith(annotationName));
View Full Code Here

Examples of org.jboss.scanning.annotations.spi.AnnotationIndex.classIsAnnotatedWith()

   private boolean excludeClassLevelInterceptorsExist(DeploymentUnit unit)
   {
      AnnotationIndex annotationRepository = unit.getAttachment(AnnotationIndex.class);
      if (annotationRepository != null)
      {
         return !annotationRepository.classIsAnnotatedWith(ExcludeDefaultInterceptors.class).isEmpty();
      }
      else
      {
         // if annotations are not scanned we won't bother checking each EJB class
         // let interceptors just go at the class level
View Full Code Here

Examples of org.jboss.scanning.annotations.spi.AnnotationIndex.classIsAnnotatedWith()

      Set<Element<Path, Class<?>>> resources = null;
      Set<Element<Provider, Class<?>>> providers = null;
      if (resteasyDeploymentData.isScanResources())
      {
         resources = env.classIsAnnotatedWith(Path.class);
      }
      if (resteasyDeploymentData.isScanProviders())
      {
         providers = env.classIsAnnotatedWith(Provider.class);
      }
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.