Examples of JBossXSSimpleTypeDefinition


Examples of org.jboss.ws.metadata.wsdl.xmlschema.JBossXSSimpleTypeDefinition

/*     */   }
/*     */
/*     */   private JBossXSTypeDefinition handleJAXRPCEnumeration(String name, String namespace, Class<?> javaType, Class<?> valueType)
/*     */   {
/* 357 */     JBossXSTypeDefinition enumType = generateType(null, valueType);
/* 358 */     JBossXSSimpleTypeDefinition simpleType = new JBossXSSimpleTypeDefinition();
/* 359 */     simpleType.setBaseType(enumType);
/* 360 */     simpleType.setName(name);
/* 361 */     simpleType.setNamespace(namespace);
/*     */     try
/*     */     {
/* 364 */       Method getValue = javaType.getMethod("getValue", new Class[0]);
/* 365 */       for (Field field : javaType.getFields())
/*     */       {
/* 367 */         if ((!Modifier.isStatic(field.getModifiers())) || (!field.getType().equals(javaType)))
/*     */           continue;
/* 369 */         Object ret = getValue.invoke(field.get(null), new Object[0]);
/* 370 */         String item = SimpleTypeBindings.marshal(enumType.getName(), ret, new NamespaceRegistry());
/* 371 */         simpleType.addLexicalEnumeration(item);
/*     */       }
/*     */
/*     */     }
/*     */     catch (Exception e)
/*     */     {
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.