Examples of AbstractAnnotationMetaData


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

/* 41 */   public static final CallbackAnnotationsInterceptor INTERCEPTOR = new CallbackAnnotationsInterceptor();
/*    */
/*    */   public void add(Object parent, Object child, QName name)
/*    */   {
/* 45 */     AbstractCallbackMetaData callbackMetaData = (AbstractCallbackMetaData)parent;
/* 46 */     AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData)child;
/* 47 */     Set annotations = callbackMetaData.getAnnotations();
/* 48 */     if (annotations == null)
/*    */     {
/* 50 */       annotations = new HashSet();
/* 51 */       callbackMetaData.setAnnotations(annotations);
View Full Code Here

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

/* 43 */   public static final BeanAnnotationInterceptor INTERCEPTOR = new BeanAnnotationInterceptor();
/*    */
/*    */   public void add(Object parent, Object child, QName name)
/*    */   {
/* 47 */     AbstractBeanMetaData bean = (AbstractBeanMetaData)parent;
/* 48 */     AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData)child;
/* 49 */     Set annotations = bean.getAnnotations();
/* 50 */     if (annotations == null)
/*    */     {
/* 52 */       annotations = new HashSet();
/* 53 */       bean.setAnnotations(annotations);
View Full Code Here

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

   /** The handler */
   public static final AnnotationHandler HANDLER = new AnnotationHandler();

   public Object startElement(Object parent, QName name, ElementBinding element)
   {
      return new AbstractAnnotationMetaData();
   }
View Full Code Here

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

      return new AbstractAnnotationMetaData();
   }

   public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
   {
      AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) o;
      for (int i = 0; i < attrs.getLength(); ++i)
      {
         String localName = attrs.getLocalName(i);
         if ("replace".equals(localName))
            annotation.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
      }

   }
View Full Code Here

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

   }

   public Object endElement(Object o, QName qName, ElementBinding element)
   {
      AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) o;
      if (annotation.getAnnotation() == null || annotation.getAnnotation().length() == 0)
      {
         throw new IllegalArgumentException("Empty <annotation/> content");
      }
      if (!annotation.getAnnotation().startsWith("@"))
      {
         throw new IllegalArgumentException("<annotation/> content must be a fully qualified annotation type name prefixed with '@'");
      }
     
      return annotation;
View Full Code Here

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

   public static final DeploymentAnnotationInterceptor INTERCEPTOR = new DeploymentAnnotationInterceptor();

   public void add(Object parent, Object child, QName name)
   {
      AbstractKernelDeployment deployment = (AbstractKernelDeployment) parent;
      AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
      Set<AnnotationMetaData> annotations = deployment.getAnnotations();
      if (annotations == null)
      {
         annotations = new HashSet<AnnotationMetaData>();
         deployment.setAnnotations(annotations);
View Full Code Here

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

   public static final ConstructorAnnotationsInterceptor INTERCEPTOR = new ConstructorAnnotationsInterceptor();

   public void add(Object parent, Object child, QName name)
   {
      AbstractConstructorMetaData constructor = (AbstractConstructorMetaData) parent;
      AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
      Set<AnnotationMetaData> annotations = constructor.getAnnotations();
      if (annotations == null)
      {
         annotations = new HashSet<AnnotationMetaData>();
         constructor.setAnnotations(annotations);
View Full Code Here

Examples of org.jboss.test.xb.builder.object.mc.support.model.AbstractAnnotationMetaData

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

Examples of org.jboss.test.xb.builder.object.mc.support.model.AbstractAnnotationMetaData

      return annotation;
   }
  
   public void testAnnotationSimple() throws Exception
   {
      AbstractAnnotationMetaData annotation = getAnnotation();
      assertEquals("@" + Annotation1.class.getName(), annotation.getAnnotation());
   }
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.