Package org.jboss.beans.metadata.plugins

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


   public static final ParameterAnnotationsInterceptor INTERCEPTOR = new ParameterAnnotationsInterceptor();

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


   public static final LifecycleAnnotationsInterceptor INTERCEPTOR = new LifecycleAnnotationsInterceptor();

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

      return value;
   }

   public void setValue(QName qname, ElementBinding element, Object owner, Object value)
   {
      AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) owner;
      annotation.setAnnotation((String)value);
   }
View Full Code Here

   public static final InstallAnnotationsInterceptor INTERCEPTOR = new InstallAnnotationsInterceptor();

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

   public static final PropertyAnnotationsInterceptor INTERCEPTOR = new PropertyAnnotationsInterceptor();

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

   public static final PolicyAnnotationsInterceptor INTERCEPTOR = new PolicyAnnotationsInterceptor();

   public void add(Object parent, Object child, QName name)
   {
      AbstractPolicyMetaData policy = (AbstractPolicyMetaData) parent;
      AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) child;
      Set<AnnotationMetaData> annotations = policy.getAnnotations();
      if (annotations == null)
      {
         annotations = new HashSet<AnnotationMetaData>();
         policy.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 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

      {
         annotations = new HashSet<AnnotationMetaData>();
         bean.setAnnotations(annotations);
      }
      // It's a bit of a hack, but it's a transparent one
      AbstractAnnotationMetaData springAnnotation = new AbstractAnnotationMetaData();
      springAnnotation.setAnnotation("@" + SpringBean.class.getName());
      annotations.add(springAnnotation);
      return bean;
   }
View Full Code Here

/* 44 */     return value;
/*    */   }
/*    */
/*    */   public void setValue(QName qname, ElementBinding element, Object owner, Object value)
/*    */   {
/* 49 */     AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData)owner;
/* 50 */     annotation.setAnnotation((String)value);
/*    */   }
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.