Package org.jboss.beans.metadata.plugins

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


/* 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

   /** 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

      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

   }

   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

   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

   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

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.