Examples of AnnotationMetadata


Examples of org.jboss.beans.metadata.spi.AnnotationMetaData

      if (annotations != null && annotations.isEmpty() == false)
      {
         Set<AnnotationMetaData> amds = new HashSet<AnnotationMetaData>();
         for (String annotation : annotations)
         {
            AnnotationMetaData amd = createAnnotationMetaData(annotation);
            amds.add(amd);
         }
         beanMetaData.setAnnotations(amds);
      }
      return this;
View Full Code Here

Examples of org.jboss.beans.metadata.spi.AnnotationMetaData

   }

   public BeanMetaDataBuilder addAnnotation(String annotation)
   {
      Set<AnnotationMetaData> annotations = getAnnotations();
      AnnotationMetaData amd = createAnnotationMetaData(annotation);
      annotations.add(amd);
      return this;
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.AnnotationMetaData

   }

   public BeanMetaDataBuilder addAnnotation(Annotation annotation)
   {
      Set<AnnotationMetaData> annotations = getAnnotations();
      AnnotationMetaData amd = createAnnotationMetaData(annotation);
      annotations.add(amd);
      return this;
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.AnnotationMetaData

   }

   public BeanMetaDataBuilder addAnnotation(String annotation, boolean replace)
   {
      Set<AnnotationMetaData> annotations = getAnnotations();
      AnnotationMetaData amd = createAnnotationMetaData(annotation, replace);
      annotations.add(amd);
      return this;
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.AnnotationMetaData

      return this;
   }

   public BeanMetaDataBuilder addPropertyAnnotation(String name, String annotation)
   {
      AnnotationMetaData amd = createAnnotationMetaData(annotation);
      return addPropertyAnnotation(name, amd);
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.AnnotationMetaData

      return addPropertyAnnotation(name, amd);
   }

   public BeanMetaDataBuilder addPropertyAnnotation(String name, String annotation, boolean replace)
   {
      AnnotationMetaData amd = createAnnotationMetaData(annotation, replace);
      return addPropertyAnnotation(name, amd);
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.AnnotationMetaData

      return addPropertyAnnotation(name, amd);
   }

   public BeanMetaDataBuilder addPropertyAnnotation(String name, Annotation annotation)
   {
      AnnotationMetaData amd = createAnnotationMetaData(annotation);
      return addPropertyAnnotation(name, amd);
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.AnnotationMetaData

      assertNotNull(annotations);
      assertEquals(expected.size(), annotations.size());
      HashSet<String> clonedExpected = new HashSet<String>(expected);
      for (Iterator<AnnotationMetaData> i = annotations.iterator(); i.hasNext();)
      {
         AnnotationMetaData annotation = i.next();
         if (clonedExpected.remove(annotation.getAnnotationInstance().annotationType().getName()) == false)
            fail("Did not expect " + annotation + " expected " + expected);
      }
      if (clonedExpected.size() != 0)
         fail("Expected " + expected + " got " + annotations);
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.AnnotationMetaData

      assertNotNull(annotations);
      assertEquals(expected.size(), annotations.size());
      HashSet<String> clonedExpected = new HashSet<String>(expected);
      for (Iterator<AnnotationMetaData> i = annotations.iterator(); i.hasNext();)
      {
         AnnotationMetaData annotation = i.next();
         if (clonedExpected.remove(annotation.getAnnotationInstance().annotationType().getName()) == false)
            fail("Did not expect " + annotation + " expected " + expected);
      }
      if (clonedExpected.size() != 0)
         fail("Expected " + expected + " got " + annotations);
   }
View Full Code Here

Examples of org.jboss.metadata.javaee.jboss.AnnotationMetaData

      JBossSessionBeanMetaData original = new JBossSessionBeanMetaData();
      original.setEjbName("session");

      AnnotationsMetaData annotations = new AnnotationsMetaData();
      original.setAnnotations(annotations);
      AnnotationMetaData annotation = new AnnotationMetaData();
      annotation.setAnnotationClass("annotation1");
      annotation.setAnnotationImplementationClass(annotation.getAnnotationClass() + "Original");
      annotations.add(annotation);
      annotation = new AnnotationMetaData();
      annotation.setAnnotationClass("annotation2");
      annotation.setAnnotationImplementationClass(annotation.getAnnotationClass() + "Original");
      annotations.add(annotation);
     
      JBossSessionBeanMetaData override = new JBossSessionBeanMetaData();
      override.setEjbName("session");
      annotations = new AnnotationsMetaData();
      override.setAnnotations(annotations);
      annotation = new AnnotationMetaData();
      annotation.setAnnotationClass("annotation2");
      annotation.setAnnotationImplementationClass(annotation.getAnnotationClass() + "Override");
      annotations.add(annotation);
      annotation = new AnnotationMetaData();
      annotation.setAnnotationClass("annotation3");
      annotation.setAnnotationImplementationClass(annotation.getAnnotationClass() + "Override");
      annotations.add(annotation);
     
      JBossSessionBeanMetaData merged = new JBossSessionBeanMetaData();
      merged.merge(override, original);
      annotations = merged.getAnnotations();
      assertNotNull(annotations);
      assertEquals(3, annotations.size());
      annotation = annotations.get("annotation1");
      assertNotNull(annotation);
      assertEquals(annotation.getAnnotationClass() + "Original", annotation.getAnnotationImplementationClass());
      annotation = annotations.get("annotation2");
      assertNotNull(annotation);
      assertEquals(annotation.getAnnotationClass() + "Override", annotation.getAnnotationImplementationClass());
      annotation = annotations.get("annotation3");
      assertNotNull(annotation);
      assertEquals(annotation.getAnnotationClass() + "Override", annotation.getAnnotationImplementationClass());
   }
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.