Package org.jboss.xb.binding.sunday.unmarshalling

Examples of org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter


      {

         TypeInfo typeInfo = JBossXBBuilder.configuration.getTypeInfo(type);
         BeanInfo adapterInfo = JBossXBBuilder.configuration.getBeanInfo(adapter);

         ValueAdapter valueAdapter = (ValueAdapter) adapterInfo.newInstance();

         QName qName = generateXmlName(typeInfo, XmlNsForm.QUALIFIED, overrideNamespace, overrideName);

         TypeInfo parentType = typeInfo.getTypeInfoFactory().getTypeInfo(String.class);
         TypeBinding parent = getSimpleType(parentType);
View Full Code Here


      {

         TypeInfo typeInfo = JBossXBBuilder.configuration.getTypeInfo(type);
         BeanInfo adapterInfo = JBossXBBuilder.configuration.getBeanInfo(adapter);

         ValueAdapter valueAdapter = (ValueAdapter) adapterInfo.newInstance();

         QName qName = generateXmlName(typeInfo, XmlNsForm.QUALIFIED, overrideNamespace, overrideName);

         TypeInfo parentType = typeInfo.getTypeInfoFactory().getTypeInfo(String.class);
         TypeBinding parent = getSimpleType(parentType);
View Full Code Here

      {

         TypeInfo typeInfo = JBossXBBuilder.configuration.getTypeInfo(type);
         BeanInfo adapterInfo = JBossXBBuilder.configuration.getBeanInfo(adapter);

         ValueAdapter valueAdapter = (ValueAdapter) adapterInfo.newInstance();

         QName qName = generateXmlName(typeInfo, XmlNsForm.QUALIFIED, overrideNamespace, overrideName);

         TypeInfo parentType = typeInfo.getTypeInfoFactory().getTypeInfo(String.class);
         TypeBinding parent = getSimpleType(parentType);
View Full Code Here

      Class<? extends ValueAdapter> adapter = annotation.valueAdapter();
      try
      {
         BeanInfo adapterInfo = JBossXBBuilder.configuration.getBeanInfo(adapter);

         ValueAdapter valueAdapter = (ValueAdapter) adapterInfo.newInstance();

         adaptedType.setValueAdapter(valueAdapter);
         if (trace)
            log.trace("adapted typeBinding=" + adaptedType + " adapter=" + adapter.getName());
      }
View Full Code Here

      Class<? extends ValueAdapter> adapter = annotation.valueAdapter();
      try
      {
         BeanInfo adapterInfo = JBossXBBuilder.configuration.getBeanInfo(adapter);

         ValueAdapter valueAdapter = (ValueAdapter) adapterInfo.newInstance();

         adaptedType.setValueAdapter(valueAdapter);
         if (trace)
            log.trace("adapted typeBinding=" + adaptedType + " adapter=" + adapter.getName());
      }
View Full Code Here

     
      ElementBinding elementBinding = schemaBinding.getElement(elementName);
      assertNotNull(elementBinding);
      TypeBinding typeBinding = elementBinding.getType();
     
      ValueAdapter valueAdapter = typeBinding.getValueAdapter();
      assertNotNull(valueAdapter);
      assertTrue(valueAdapter instanceof EnumValueAdapter);
      testEnumValueAdapter((EnumValueAdapter)valueAdapter);
   }
View Full Code Here

      QName elementName = new QName(XMLConstants.NULL_NS_URI, "root");
      ElementBinding elementBinding = schemaBinding.getElement(elementName);
      assertNotNull(elementBinding);
      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>();
View Full Code Here

      catch(JBossXBRuntimeException e)
      {
      }
     
      complexType.setValueAdapter(
         new ValueAdapter()
         {
            public Object cast(Object o, Class<?> c)
            {
               // TODO Auto-generated method stub
               return null;
View Full Code Here

      {

         TypeInfo typeInfo = JBossXBBuilder.configuration.getTypeInfo(type);
         BeanInfo adapterInfo = JBossXBBuilder.configuration.getBeanInfo(adapter);

         ValueAdapter valueAdapter = (ValueAdapter) adapterInfo.newInstance();

         QName qName = generateXmlName(typeInfo, XmlNsForm.QUALIFIED, overrideNamespace, overrideName);

         TypeInfo parentType = typeInfo.getTypeInfoFactory().getTypeInfo(String.class);
         TypeBinding parent = getSimpleType(parentType);
View Full Code Here

   }

   @Override
   public void attribute(QName elemName, QName attrName, AttributeBinding binding, Object owner, Object value)
   {
      ValueAdapter valueAdapter = binding.getValueAdapter();
      if (valueAdapter != null)
         value = valueAdapter.cast(value, null);
     
      BeanAdapter parent = (BeanAdapter) owner;
      doHandle(parent, value, attrName);
   }
View Full Code Here

TOP

Related Classes of org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter

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.