Examples of PackageInfo


Examples of org.jboss.reflect.spi.PackageInfo

    */
   protected static void initSchema(SchemaBinding schemaBinding, ClassInfo classInfo)
   {
      // Look for a schema attribute on either the root or the root's package
      JBossXmlSchema schema = classInfo.getUnderlyingAnnotation(JBossXmlSchema.class);
      PackageInfo packageInfo = classInfo.getPackage();
      if (schema == null && packageInfo != null)
      {
         schema = packageInfo.getUnderlyingAnnotation(JBossXmlSchema.class);
      }
     
      // Use the root's package name
      String packageName = null;
      if (packageInfo != null)
         packageName = packageInfo.getName();
      // Look for annotation override
      if (schema != null)
      {
         String schemaPackageName = schema.packageName();
         if (JBossXmlConstants.DEFAULT.equals(schemaPackageName) == false)
View Full Code Here

Examples of org.jboss.reflect.spi.PackageInfo

         attributeForm = jbossXmlSchema.attributeFormDefault();
         elementForm = jbossXmlSchema.elementFormDefault();
      }

      // Look for an annotation
      PackageInfo packageInfo = root.getPackage();
      if (packageInfo != null)
      {
         jbossXmlSchema = root.getUnderlyingAnnotation(JBossXmlSchema.class);
         if (jbossXmlSchema != null)
         {
            if (attributeForm == XmlNsForm.UNSET)
               attributeForm = jbossXmlSchema.attributeFormDefault();
            if (elementForm == XmlNsForm.UNSET)
               elementForm = jbossXmlSchema.elementFormDefault();
         }

         XmlSchema xmlSchema = packageInfo.getUnderlyingAnnotation(XmlSchema.class);
         if (xmlSchema != null)
         {
            String namespace = xmlSchema.namespace();
            if (JBossXmlConstants.DEFAULT.equals(xmlSchema) == false && XMLConstants.NULL_NS_URI.equals(defaultNamespace))
            {
               defaultNamespace = namespace;
               addNamespace(defaultNamespace, true);
            }

            if (attributeForm == XmlNsForm.UNSET)
               attributeForm = xmlSchema.attributeFormDefault();
            if (elementForm == XmlNsForm.UNSET)
               elementForm = xmlSchema.elementFormDefault();
         }

         // Check for adapted types
         JBossXmlAdaptedTypes adaptedTypes = packageInfo.getUnderlyingAnnotation(JBossXmlAdaptedTypes.class);
         if (adaptedTypes != null)
         {
            for (JBossXmlAdaptedType adaptedType : adaptedTypes.value())
               generateAdaptedType(adaptedType);
         }
         JBossXmlAdaptedType adaptedType = packageInfo.getUnderlyingAnnotation(JBossXmlAdaptedType.class);
         if (adaptedType != null)
            generateAdaptedType(adaptedType);
      }
   }
View Full Code Here

Examples of org.jboss.reflect.spi.PackageInfo

      }
      // Determine the property access order
      XmlAccessorOrder accessorOrder = typeInfo.getUnderlyingAnnotation(XmlAccessorOrder.class);
      if (accessorOrder == null)
      {
         PackageInfo pkg = typeInfo.getPackage();
         if (pkg != null)
            accessorOrder = pkg.getUnderlyingAnnotation(XmlAccessorOrder.class);
      }
      if (accessorOrder != null)
         accessOrder = accessorOrder.value();

      // Create the binding
View Full Code Here

Examples of org.jboss.reflect.spi.PackageInfo

         attributeForm = jbossXmlSchema.attributeFormDefault();
         elementForm = jbossXmlSchema.elementFormDefault();
      }

      // Look for an annotation
      PackageInfo packageInfo = root.getPackage();
      if (packageInfo != null)
      {
         jbossXmlSchema = root.getUnderlyingAnnotation(JBossXmlSchema.class);
         if (jbossXmlSchema != null)
         {
            if (attributeForm == XmlNsForm.UNSET)
               attributeForm = jbossXmlSchema.attributeFormDefault();
            if (elementForm == XmlNsForm.UNSET)
               elementForm = jbossXmlSchema.elementFormDefault();
         }

         XmlSchema xmlSchema = packageInfo.getUnderlyingAnnotation(XmlSchema.class);
         if (xmlSchema != null)
         {
            String namespace = xmlSchema.namespace();
            if (JBossXmlConstants.DEFAULT.equals(xmlSchema) == false && XMLConstants.NULL_NS_URI.equals(defaultNamespace))
            {
               defaultNamespace = namespace;
               addNamespace(defaultNamespace, true);
            }

            if (attributeForm == XmlNsForm.UNSET)
               attributeForm = xmlSchema.attributeFormDefault();
            if (elementForm == XmlNsForm.UNSET)
               elementForm = xmlSchema.elementFormDefault();
         }

         // Check for adapted types
         JBossXmlAdaptedTypes adaptedTypes = packageInfo.getUnderlyingAnnotation(JBossXmlAdaptedTypes.class);
         if (adaptedTypes != null)
         {
            for (JBossXmlAdaptedType adaptedType : adaptedTypes.value())
               generateAdaptedType(adaptedType);
         }
         JBossXmlAdaptedType adaptedType = packageInfo.getUnderlyingAnnotation(JBossXmlAdaptedType.class);
         if (adaptedType != null)
            generateAdaptedType(adaptedType);
      }
   }
View Full Code Here

Examples of org.jboss.reflect.spi.PackageInfo

      }
      // Determine the property access order
      XmlAccessorOrder accessorOrder = typeInfo.getUnderlyingAnnotation(XmlAccessorOrder.class);
      if (accessorOrder == null)
      {
         PackageInfo pkg = typeInfo.getPackage();
         if (pkg != null)
            accessorOrder = pkg.getUnderlyingAnnotation(XmlAccessorOrder.class);
      }
      if (accessorOrder != null)
         accessOrder = accessorOrder.value();

      // Create the binding
View Full Code Here

Examples of org.jboss.reflect.spi.PackageInfo

    */
   protected static void initSchema(SchemaBinding schemaBinding, ClassInfo classInfo)
   {
      // Look for a schema attribute on either the root or the root's package
      JBossXmlSchema schema = classInfo.getUnderlyingAnnotation(JBossXmlSchema.class);
      PackageInfo packageInfo = classInfo.getPackage();
      if (schema == null && packageInfo != null)
      {
         schema = packageInfo.getUnderlyingAnnotation(JBossXmlSchema.class);
      }
     
      // Use the root's package name
      String packageName = null;
      if (packageInfo != null)
         packageName = packageInfo.getName();
      // Look for annotation override
      if (schema != null)
      {
         String schemaPackageName = schema.packageName();
         if (JBossXmlConstants.DEFAULT.equals(schemaPackageName) == false)
View Full Code Here

Examples of org.jboss.reflect.spi.PackageInfo

/*      */     {
/*  208 */       this.attributeForm = jbossXmlSchema.attributeFormDefault();
/*  209 */       this.elementForm = jbossXmlSchema.elementFormDefault();
/*      */     }
/*      */
/*  213 */     PackageInfo packageInfo = this.root.getPackage();
/*  214 */     if (packageInfo != null)
/*      */     {
/*  216 */       jbossXmlSchema = (JBossXmlSchema)this.root.getUnderlyingAnnotation(JBossXmlSchema.class);
/*  217 */       if (jbossXmlSchema != null)
/*      */       {
/*  219 */         if (this.attributeForm == XmlNsForm.UNSET)
/*  220 */           this.attributeForm = jbossXmlSchema.attributeFormDefault();
/*  221 */         if (this.elementForm == XmlNsForm.UNSET) {
/*  222 */           this.elementForm = jbossXmlSchema.elementFormDefault();
/*      */         }
/*      */       }
/*  225 */       XmlSchema xmlSchema = (XmlSchema)packageInfo.getUnderlyingAnnotation(XmlSchema.class);
/*  226 */       if (xmlSchema != null)
/*      */       {
/*  228 */         String namespace = xmlSchema.namespace();
/*  229 */         if ((!"##default".equals(xmlSchema)) && ("".equals(this.defaultNamespace)))
/*      */         {
/*  231 */           this.defaultNamespace = namespace;
/*  232 */           addNamespace(this.defaultNamespace, true);
/*      */         }
/*      */
/*  235 */         if (this.attributeForm == XmlNsForm.UNSET)
/*  236 */           this.attributeForm = xmlSchema.attributeFormDefault();
/*  237 */         if (this.elementForm == XmlNsForm.UNSET) {
/*  238 */           this.elementForm = xmlSchema.elementFormDefault();
/*      */         }
/*      */       }
/*      */
/*  242 */       JBossXmlAdaptedTypes adaptedTypes = (JBossXmlAdaptedTypes)packageInfo.getUnderlyingAnnotation(JBossXmlAdaptedTypes.class);
/*  243 */       if (adaptedTypes != null)
/*      */       {
/*  245 */         for (JBossXmlAdaptedType adaptedType : adaptedTypes.value())
/*  246 */           generateAdaptedType(adaptedType);
/*      */       }
/*  248 */       JBossXmlAdaptedType adaptedType = (JBossXmlAdaptedType)packageInfo.getUnderlyingAnnotation(JBossXmlAdaptedType.class);
/*  249 */       if (adaptedType != null)
/*  250 */         generateAdaptedType(adaptedType);
/*      */     }
/*      */   }
View Full Code Here

Examples of org.jboss.reflect.spi.PackageInfo

/*      */     }
/*      */
/*  736 */     XmlAccessorOrder accessorOrder = (XmlAccessorOrder)typeInfo.getUnderlyingAnnotation(XmlAccessorOrder.class);
/*  737 */     if (accessorOrder == null)
/*      */     {
/*  739 */       PackageInfo pkg = typeInfo.getPackage();
/*  740 */       if (pkg != null)
/*  741 */         accessorOrder = (XmlAccessorOrder)pkg.getUnderlyingAnnotation(XmlAccessorOrder.class);
/*      */     }
/*  743 */     if (accessorOrder != null) {
/*  744 */       accessOrder = accessorOrder.value();
/*      */     }
/*      */
View Full Code Here

Examples of org.jboss.reflect.spi.PackageInfo

/*  86 */     if (this == obj)
/*  87 */       return true;
/*  88 */     if ((obj == null) || (!(obj instanceof PackageInfo))) {
/*  89 */       return false;
/*     */     }
/*  91 */     PackageInfo other = (PackageInfo)obj;
/*     */
/*  93 */     String name = getName();
/*     */
/*  95 */     return name != null ? name.equals(other.getName()) : other.getName() == null;
/*     */   }
View Full Code Here

Examples of org.jboss.reflect.spi.PackageInfo

/*     */   }
/*     */
/*     */   protected static void initSchema(SchemaBinding schemaBinding, ClassInfo classInfo)
/*     */   {
/* 117 */     JBossXmlSchema schema = (JBossXmlSchema)classInfo.getUnderlyingAnnotation(JBossXmlSchema.class);
/* 118 */     PackageInfo packageInfo = classInfo.getPackage();
/* 119 */     if ((schema == null) && (packageInfo != null))
/*     */     {
/* 121 */       schema = (JBossXmlSchema)packageInfo.getUnderlyingAnnotation(JBossXmlSchema.class);
/*     */     }
/*     */
/* 125 */     String packageName = null;
/* 126 */     if (packageInfo != null) {
/* 127 */       packageName = packageInfo.getName();
/*     */     }
/* 129 */     if (schema != null)
/*     */     {
/* 131 */       String schemaPackageName = schema.packageName();
/* 132 */       if (!"##default".equals(schemaPackageName)) {
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.