Package org.jboss.xb.builder.runtime

Examples of org.jboss.xb.builder.runtime.EnumValueAdapter


//      System.err.println(type.getAttributes());
//      System.err.println(type.getBaseType());
//      System.err.println(type.getValueAdapter());
      println("<xsd:simpleType name=\"" + type.getQName().getLocalPart() + "\">");
      println("   <xsd:restriction base=\"" + prefixed(type.getBaseType().getQName()) + "\">");
      EnumValueAdapter enumValueAdapter = (EnumValueAdapter) type.getValueAdapter();
      for(Object o : enumValueAdapter.getMapping().values())
      {
         println("      <xsd:enumeration value=\"" + o + "\"/>");
      }
      println("   </xsd:restriction>");
      println("</xsd:simpleType>");
View Full Code Here


      else
      {
         typeBinding = new TypeBinding(null, parent);
      }

      typeBinding.setValueAdapter(new EnumValueAdapter(qName, typeInfo, enumType));

      if (trace)
         log.trace("Created enum=" + typeInfo.getName() + " type=" + typeBinding + " rootType=" + root);

      // Bind it as a global type
View Full Code Here

      else
      {
         typeBinding = new TypeBinding(null, parent);
      }

      typeBinding.setValueAdapter(new EnumValueAdapter(qName, typeInfo, enumType));

      if (trace)
         log.trace("Created enum=" + typeInfo.getName() + " type=" + typeBinding + " rootType=" + root);

      // Bind it as a global type
View Full Code Here

      else
      {
         typeBinding = new TypeBinding(null, parent);
      }

      typeBinding.setValueAdapter(new EnumValueAdapter(qName, typeInfo, enumType));

      if (trace)
         log.trace("Created enum=" + typeInfo.getName() + " type=" + typeBinding + " rootType=" + root);

      // Bind it as a global type
View Full Code Here

      else
      {
         typeBinding = new TypeBinding(null, parent);
      }

      typeBinding.setValueAdapter(new EnumValueAdapter(qName, typeInfo, enumType));

      if (trace)
         log.trace("Created enum=" + typeInfo.getName() + " type=" + typeBinding + " rootType=" + root);

      // Bind it as a global type
View Full Code Here

      else
      {
         typeBinding = new TypeBinding(null, parent);
      }

      typeBinding.setValueAdapter(new EnumValueAdapter(qName, typeInfo, enumType));

      if (trace)
         log.trace("Created enum=" + typeInfo.getName() + " type=" + typeBinding + " rootType=" + root);

      // Bind it as a global type
View Full Code Here

      TypeBinding typeBinding = elementBinding.getType();
     
      ValueAdapter valueAdapter = typeBinding.getValueAdapter();
      assertNotNull(valueAdapter);
      assertTrue(valueAdapter instanceof EnumValueAdapter);
      EnumValueAdapter enumValueAdapter = (EnumValueAdapter) valueAdapter;

      HashMap<Object, Object> expected = new HashMap<Object, Object>();
      expected.put(new Integer(1), Root.ONE);
      expected.put(new Integer(2), Root.TWO);
      expected.put(new Integer(3), Root.THREE);

      Map<Object, Object> actual = enumValueAdapter.getMapping();
      assertEquals(expected, actual);
   }
View Full Code Here

      else
      {
         typeBinding = new TypeBinding(null, parent);
      }

      typeBinding.setValueAdapter(new EnumValueAdapter(qName, typeInfo, enumType));

      if (trace)
         log.trace("Created enum=" + typeInfo.getName() + " type=" + typeBinding + " rootType=" + root);

      // Bind it as a global type
View Full Code Here

/*      */     else
/*      */     {
/*  527 */       typeBinding = new TypeBinding(null, parent);
/*      */     }
/*      */
/*  530 */     typeBinding.setValueAdapter(new EnumValueAdapter(qName, typeInfo, enumType));
/*      */
/*  532 */     if (this.trace) {
/*  533 */       log.trace("Created enum=" + typeInfo.getName() + " type=" + typeBinding + " rootType=" + root);
/*      */     }
/*      */
View Full Code Here

TOP

Related Classes of org.jboss.xb.builder.runtime.EnumValueAdapter

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.