Examples of JaxBeanInfo


Examples of com.sun.xml.bind.v2.runtime.JaxBeanInfo

        loader.startElement(state,ea);
    }

    /*pacakge*/ static JaxBeanInfo parseXsiType(UnmarshallingContext.State state, TagName ea, @Nullable JaxBeanInfo defaultBeanInfo) throws SAXException {
        UnmarshallingContext context = state.getContext();
        JaxBeanInfo beanInfo = null;

        // look for @xsi:type
        Attributes atts = ea.atts;
        int idx = atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"type");

View Full Code Here

Examples of com.sun.xml.bind.v2.runtime.JaxBeanInfo

                return;
            }

            // the registry doesn't know about this element.
            // try its xsi:type
            JaxBeanInfo beanInfo = XsiTypeLoader.parseXsiType(state, ea, null);
            if(beanInfo==null) {
                // we don't even know its xsi:type
                reportUnexpectedChildElement(ea,false);
                return;
            }

            state.loader = beanInfo.getLoader(null,false);
            state.prev.backup = new JAXBElement<Object>(ea.createQName(),Object.class,null);
            state.receiver = this;
        }
View Full Code Here

Examples of com.sun.xml.bind.v2.runtime.JaxBeanInfo

    }

    protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {

        UnmarshallingContext context = state.getContext();
        JaxBeanInfo beanInfo = null;

        // look for @xsi:type
        Attributes atts = ea.atts;
        int idx = atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE, "type");
View Full Code Here

Examples of com.sun.xml.bind.v2.runtime.JaxBeanInfo

/*      */
/*  334 */       if (this.classResolver != null) {
/*  335 */         Class clazz = this.classResolver.resolveElementName(tag.uri, tag.local);
/*  336 */         if (clazz != null) {
/*  337 */           JAXBContextImpl enhanced = getJAXBContext().createAugmented(clazz);
/*  338 */           JaxBeanInfo bi = enhanced.getBeanInfo(clazz);
/*  339 */           return bi.getLoader(enhanced, true);
/*      */         }
/*      */       }
/*      */     } catch (RuntimeException e) {
/*  343 */       throw e;
/*      */     } catch (Exception e) {
View Full Code Here

Examples of com.sun.xml.bind.v2.runtime.JaxBeanInfo

/*  999 */         state.loader = loader;
/* 1000 */         state.receiver = this;
/* 1001 */         return;
/*      */       }
/*      */
/* 1006 */       JaxBeanInfo beanInfo = XsiTypeLoader.parseXsiType(state, ea, null);
/* 1007 */       if (beanInfo == null)
/*      */       {
/* 1009 */         reportUnexpectedChildElement(ea, false);
/* 1010 */         return;
/*      */       }
/*      */
/* 1013 */       state.loader = beanInfo.getLoader(null, false);
/* 1014 */       state.prev.backup = new JAXBElement(ea.createQName(), Object.class, null);
/* 1015 */       state.receiver = this;
/*      */     }
View Full Code Here

Examples of com.sun.xml.bind.v2.runtime.JaxBeanInfo

/*  62 */     super(true);
/*  63 */     this.defaultBeanInfo = defaultBeanInfo;
/*     */   }
/*     */
/*     */   public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
/*  67 */     JaxBeanInfo beanInfo = parseXsiType(state, ea, this.defaultBeanInfo);
/*  68 */     if (beanInfo == null) {
/*  69 */       beanInfo = this.defaultBeanInfo;
/*     */     }
/*  71 */     Loader loader = beanInfo.getLoader(null, false);
/*  72 */     state.loader = loader;
/*  73 */     loader.startElement(state, ea);
/*     */   }
View Full Code Here

Examples of com.sun.xml.bind.v2.runtime.JaxBeanInfo

/*  73 */     loader.startElement(state, ea);
/*     */   }
/*     */
/*     */   static JaxBeanInfo parseXsiType(UnmarshallingContext.State state, TagName ea, @Nullable JaxBeanInfo defaultBeanInfo) throws SAXException {
/*  77 */     UnmarshallingContext context = state.getContext();
/*  78 */     JaxBeanInfo beanInfo = null;
/*     */
/*  81 */     Attributes atts = ea.atts;
/*  82 */     int idx = atts.getIndex("http://www.w3.org/2001/XMLSchema-instance", "type");
/*     */
/*  84 */     if (idx >= 0)
View Full Code Here

Examples of com.sun.xml.bind.v2.runtime.JaxBeanInfo

/*     */
/*     */   public void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
/* 102 */     Object v = this.acc.get(o);
/* 103 */     if (v != null)
/*     */       try {
/* 105 */         JaxBeanInfo bi = w.grammar.getBeanInfo(v, true);
/* 106 */         if ((bi.jaxbType == Object.class) && (this.domHandler != null))
/*     */         {
/* 109 */           w.writeDom(v, this.domHandler, o, this.fieldName);
/*     */         }
/* 111 */         else bi.serializeRoot(v, w);
/*     */       }
/*     */       catch (JAXBException e) {
/* 113 */         w.reportError(this.fieldName, e);
/*     */       }
/*     */   }
View Full Code Here

Examples of com.sun.xml.bind.v2.runtime.JaxBeanInfo

/* 129 */     return PropertyKind.REFERENCE;
/*     */   }
/*     */
/*     */   public Accessor getElementPropertyAccessor(String nsUri, String localName)
/*     */   {
/* 134 */     JaxBeanInfo bi = (JaxBeanInfo)this.expectedElements.get(nsUri, localName);
/* 135 */     if (bi != null) {
/* 136 */       if ((bi instanceof ElementBeanInfoImpl)) {
/* 137 */         ElementBeanInfoImpl ebi = (ElementBeanInfoImpl)bi;
/*     */
/* 139 */         return new Accessor(ebi.expectedType, ebi) {
View Full Code Here

Examples of com.sun.xml.bind.v2.runtime.JaxBeanInfo

/*  95 */     this.acceptedElements = new QName[prop.getTypes().size()];
/*  96 */     for (int i = 0; i < this.acceptedElements.length; i++) {
/*  97 */       this.acceptedElements[i] = ((RuntimeTypeRef)prop.getTypes().get(i)).getTagName();
/*     */     }
/*  99 */     for (RuntimeTypeRef e : prop.getTypes()) {
/* 100 */       JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget());
/* 101 */       if (nt == null) nt = e.getTagName();
/* 102 */       this.typeNames.put(beanInfo.jaxbType, new TagAndType(context.nameBuilder.createElementName(e.getTagName()), beanInfo));
/*     */
/* 104 */       nil |= e.isNillable();
/*     */     }
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.