Package org.jboss.beans.metadata.plugins

Examples of org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData


         assertNull(ctx);
   }
  
   private Set<AnnotationMetaData> createWeldAnnotationMetaData()
   {
      AbstractAnnotationMetaData amd = new AbstractAnnotationMetaData();
      amd.setAnnotation("@" + Weld.class.getName());
      return Collections.singleton((AnnotationMetaData)amd);
   }
View Full Code Here


    * @param annotation the string annotation
    * @return the annotation metadata
    */
   protected AnnotationMetaData createAnnotationMetaData(String annotation)
   {
      return new AbstractAnnotationMetaData(annotation);
   }
View Full Code Here

    * @param replace the replace flag
    * @return the annotation metadata
    */
   protected AnnotationMetaData createAnnotationMetaData(String annotation, boolean replace)
   {
      AbstractAnnotationMetaData amd = new AbstractAnnotationMetaData(annotation);
      amd.setReplace(replace);
      return amd;
   }
View Full Code Here

      AbstractBeanMetaData bean = unmarshalBean(name);
      ConstructorMetaData constructor = bean.getConstructor();
      assertNotNull(constructor);
      Set<AnnotationMetaData> annotations = constructor.getAnnotations();
      assertEquals(1, annotations.size());
      AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) annotations.iterator().next();
      assertNotNull(annotation);
      return annotation;
   }
View Full Code Here

      return annotation;
   }
  
   public void testSimpleAnnotation() throws Exception
   {
      AbstractAnnotationMetaData annotation = getAnnotation("AnnotationSimple.xml");
      Annotation ann = annotation.getAnnotationInstance();
      assertEquals(Annotation1.class.getName(), ann.annotationType().getName());
      assertTrue(ann instanceof Annotation1);
   }
View Full Code Here

      assertTrue(ann instanceof Annotation1);
   }
  
   public void testAnnotationWithAttribute() throws Exception
   {
      AbstractAnnotationMetaData annotation = getAnnotation("AnnotationWithAttribute.xml");
      Annotation ann = annotation.getAnnotationInstance();
      assertEquals(AnnotationWithAttribute.class.getName(), ann.annotationType().getName());
      assertTrue(ann instanceof AnnotationWithAttribute);
      AnnotationWithAttribute ann1 = (AnnotationWithAttribute)ann;
      assertNotNull(ann1.attribute());
      assertEquals(Long.class, ann1.attribute());
View Full Code Here

      assertEquals(Long.class, ann1.attribute());
   }
  
   public void testAnnotationWithAttributes() throws Exception
   {
      AbstractAnnotationMetaData annotation = getAnnotation("AnnotationWithAttributes.xml");
      Annotation ann = annotation.getAnnotationInstance();
      assertEquals(AnnotationWithAttributes.class.getName(), ann.annotationType().getName());
      assertTrue(ann instanceof AnnotationWithAttributes);
      AnnotationWithAttributes ann1 = (AnnotationWithAttributes)ann;
      assertNotNull(ann1.clazz());
      assertEquals(Integer.class, ann1.clazz());
View Full Code Here

      AbstractBeanMetaData bean = unmarshalBean();
      ConstructorMetaData constructor = bean.getConstructor();
      assertNotNull(constructor);
      Set<AnnotationMetaData> annotations = constructor.getAnnotations();
      assertEquals(1, annotations.size());
      AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) annotations.iterator().next();
      assertNotNull(annotation);
      return annotation;
   }
View Full Code Here

      return annotation;
   }
  
   public void testAnnotationSimple() throws Exception
   {
      AbstractAnnotationMetaData annotation = getAnnotation();
      Annotation ann = annotation.getAnnotationInstance();
      assertEquals(Annotation1.class.getName(), ann.annotationType().getName());
      assertTrue(ann instanceof Annotation1);
   }
View Full Code Here

      assertTrue(ann instanceof Annotation1);
   }
  
   public void testAnnotationWithAttribute() throws Exception
   {
      AbstractAnnotationMetaData annotation = getAnnotation();
      Annotation ann = annotation.getAnnotationInstance();
      assertEquals(AnnotationWithAttribute.class.getName(), ann.annotationType().getName());
      assertTrue(ann instanceof AnnotationWithAttribute);
      AnnotationWithAttribute ann1 = (AnnotationWithAttribute)ann;
      assertNotNull(ann1.attribute());
      assertEquals(Long.class, ann1.attribute());
View Full Code Here

TOP

Related Classes of org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData

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.