Package com.sun.xml.bind.api

Examples of com.sun.xml.bind.api.JAXBRIContext


        List<TypeReference> typeRefs = new ArrayList<TypeReference>();
        typeRefs.add(ref);
        List<Class<?>> clses = new ArrayList<Class<?>>(ctxClasses);
        clses.add(ref.type.getClass());
        try {
            JAXBRIContext riContext = JAXBRIContext.newInstance(clses.toArray(new Class[clses.size()]),
                                                                    typeRefs, null, null, true, null);
            Bridge bridge = riContext.createBridge(ref);
          
            if (source instanceof XMLStreamReader) {
                //DOMUtils.writeXml(StaxUtils.read((XMLStreamReader)source), System.out);
                return bridge.unmarshal((XMLStreamReader)source);              
            } else if (source instanceof InputStream) {
View Full Code Here


      {
         RuntimeAnnotationReader anReader = null;
         if (bcust != null)
            anReader = (RuntimeAnnotationReader)bcust.get(JAXBRIContext.ANNOTATION_READER);

         JAXBRIContext jaxbCtx = JAXBRIContext.newInstance(classes, refs, null, defaultNS, c14n, anReader);
         incrementContextCount();
         return jaxbCtx;
      }
      catch (JAXBException e)
      {
View Full Code Here

            types.add(retParam.getJavaType());
         }
      }

      // Create a JAXBContext for those types
      JAXBRIContext jaxbCtx = null;
      if (useJAXBAccessorFactory)
      {
         Class[] typeArr = new Class[types.size()];
         jaxbCtx = (JAXBRIContext)JAXBContextFactory.newInstance().createContext(types.toArray(typeArr));
      }
View Full Code Here

      {
         RuntimeAnnotationReader anReader = null;
         if (bcust != null)
            anReader = (RuntimeAnnotationReader)bcust.get(JAXBRIContext.ANNOTATION_READER);

         JAXBRIContext jaxbCtx = JAXBRIContext.newInstance(classes, refs, null, defaultNS, c14n, anReader);
         incrementContextCount();
         return jaxbCtx;
      }
      catch (JAXBException e)
      {
View Full Code Here

      {
         RuntimeAnnotationReader anReader = null;
         if (bcust != null)
            anReader = (RuntimeAnnotationReader)bcust.get(JAXBRIContext.ANNOTATION_READER);

         JAXBRIContext jaxbCtx = JAXBRIContext.newInstance(classes, refs, null, defaultNS, c14n, anReader);
         incrementContextCount();
         return jaxbCtx;
      }
      catch (JAXBException e)
      {
View Full Code Here

            types.add(retParam.getJavaType());
         }
      }
     
      // Create a JAXBContext for those types
      JAXBRIContext jaxbCtx = null;
      if (useJAXBAccessorFactory)
      {
         Class[] typeArr = new Class[types.size()];
         jaxbCtx = (JAXBRIContext)JAXBContextFactory.newInstance().createContext(types.toArray(typeArr));
      }
View Full Code Here

            types.add(retParam.getJavaType());
         }
      }

      // Create a JAXBContext for those types
      JAXBRIContext jaxbCtx = null;
      if (useJAXBAccessorFactory)
      {
         Class[] typeArr = new Class[types.size()];
         jaxbCtx = (JAXBRIContext)JAXBContextFactory.newInstance().createContext(types.toArray(typeArr));
      }
View Full Code Here

        String defaultNamespaceRemap = bi.getDefaultNamespace();
        Boolean c14nSupport = (Boolean) bi.properties().get("c14nSupport");
        RuntimeAnnotationReader ar = (RuntimeAnnotationReader) bi.properties().get("com.sun.xml.bind.v2.model.annotation.RuntimeAnnotationReader");
        JAXBContextFactory jaxbContextFactory = (JAXBContextFactory) bi.properties().get(JAXBContextFactory.class.getName());
        try {
            JAXBRIContext context = (jaxbContextFactory != null)
                    ? jaxbContextFactory.createJAXBContext(
                    bi.getSEIModel(),
                    toList(classes),
                    toList(typeInfoMappings.values()))
                    : ContextFactory.createContext(
View Full Code Here

TOP

Related Classes of com.sun.xml.bind.api.JAXBRIContext

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.