Package com.sun.xml.bind.v2.runtime.unmarshaller

Examples of com.sun.xml.bind.v2.runtime.unmarshaller.DefaultValueLoaderDecorator


                        reader.next();
                        StringBuffer sb = null;
                        byte [] value = null;
                        CharSequence charSeq = ((XMLStreamReaderEx)reader).getPCDATA();
                        if(charSeq instanceof Base64Data){
                            Base64Data bd = (Base64Data) ((XMLStreamReaderEx)reader).getPCDATA();
                            value = bd.getExact();
                            if(canonWriter != null){
                                String ev = Base64.encode(value);
                                canonWriter.writeCharacters(ev);
                            }
                        }else {
View Full Code Here


        byte [] value = null;
        if(reader.getEventType() == reader.CHARACTERS){
            if(reader instanceof XMLStreamReaderEx){
                CharSequence charSeq = ((XMLStreamReaderEx)reader).getPCDATA();
                if(charSeq instanceof Base64Data){
                    Base64Data bd = (Base64Data) ((XMLStreamReaderEx)reader).getPCDATA();
                    value = bd.getExact();
                    if(canonWriter != null){
                        String ev = Base64.encode(value);
                        canonWriter.writeCharacters(ev);
                    }
                }else{
View Full Code Here

    }

    public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
        keyLoader = keyBeanInfo.getLoader(chain.context,true);
        valueLoader = valueBeanInfo.getLoader(chain.context,true);
        handlers.put(tagName,new ChildLoader(itemsLoader,null));
    }
View Full Code Here

        for (TypeRef<Type,Class> e : prop.getTypes()) {
            JaxBeanInfo bi = context.getOrCreate((RuntimeTypeInfo) e.getTarget());
            Loader l = bi.getLoader(context,true);
            if(e.getDefaultValue()!=null)
                l = new DefaultValueLoaderDecorator(l,e.getDefaultValue());
            if(nillable)
                l = new XsiNilLoader.Single(l,acc);
            handlers.put( e.getTagName(), new ChildLoader(l,acc));
        }
    }
View Full Code Here

            Loader item = createItemUnmarshaller(chain,typeRef);

            if(typeRef.isNillable())
                item = new XsiNilLoader.Array(item);
            if(typeRef.getDefaultValue()!=null)
                item = new DefaultValueLoaderDecorator(item,typeRef.getDefaultValue());

            loaders.put(tagName,new ChildLoader(item,recv));
        }
    }
View Full Code Here

    }

    public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
        Loader l = new LeafPropertyLoader(xacc);
        if(defaultValue!=null)
            l = new DefaultValueLoaderDecorator(l,defaultValue);
        if(nillable)
            l = new XsiNilLoader.Single(l,acc);
        handlers.put(tagName,new ChildLoader(l,null));
    }
View Full Code Here

            Loader item = createItemUnmarshaller(chain,typeRef);

            if(typeRef.isNillable() || chain.context.allNillable)
                item = new XsiNilLoader.Array(item);
            if(typeRef.getDefaultValue()!=null)
                item = new DefaultValueLoaderDecorator(item,typeRef.getDefaultValue());

            loaders.put(tagName,new ChildLoader(item,recv));
        }
    }
View Full Code Here

    }

    public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
        Loader l = new LeafPropertyLoader(xacc);
        if(defaultValue!=null)
            l = new DefaultValueLoaderDecorator(l,defaultValue);
        if(nillable || chain.context.allNillable)
            l = new XsiNilLoader.Single(l,acc);
        handlers.put(tagName,new ChildLoader(l,null));
    }
View Full Code Here

            JaxBeanInfo bi = context.getOrCreate((RuntimeTypeInfo) e.getTarget());
            // if the expected Java type is already final, type substitution won't really work anyway.
            // this also traps cases like trying to substitute xsd:long element with xsi:type='xsd:int'
            Loader l = bi.getLoader(context,!Modifier.isFinal(bi.jaxbType.getModifiers()));
            if(e.getDefaultValue()!=null)
                l = new DefaultValueLoaderDecorator(l,e.getDefaultValue());
            if(nillable || chain.context.allNillable)
                l = new XsiNilLoader.Single(l,acc);
            handlers.put( e.getTagName(), new ChildLoader(l,acc));
        }
    }
View Full Code Here

            JaxBeanInfo bi = context.getOrCreate((RuntimeTypeInfo) e.getTarget());
            // if the expected Java type is already final, type substitution won't really work anyway.
            // this also traps cases like trying to substitute xsd:long element with xsi:type='xsd:int'
            Loader l = bi.getLoader(context,!Modifier.isFinal(bi.jaxbType.getModifiers()));
            if(e.getDefaultValue()!=null)
                l = new DefaultValueLoaderDecorator(l,e.getDefaultValue());
            if(nillable || chain.context.allNillable)
                l = new XsiNilLoader.Single(l,acc);
            handlers.put( e.getTagName(), new ChildLoader(l,acc));
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.bind.v2.runtime.unmarshaller.DefaultValueLoaderDecorator

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.