Java Code Examples for com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader

The following examples show how to use com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
    final int offset = chain.allocateOffset();

    Receiver recv = new ReceiverImpl(offset);

    for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) {
        final JaxBeanInfo beanInfo = n.getValue();
        loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv));
    }

    if(isMixed) {
        // handler for processing mixed contents.
        loaders.put(TEXT_HANDLER,
            new ChildLoader(new MixedTextLoader(recv),null));
    }

    if(domHandler!=null) {
        loaders.put(CATCH_ALL,
            new ChildLoader(new WildcardLoader(domHandler,wcMode),recv));
    }
}
 
Example 2
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
    final int offset = chain.allocateOffset();

    Receiver recv = new ReceiverImpl(offset);

    for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) {
        final JaxBeanInfo beanInfo = n.getValue();
        loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv));
    }

    if(isMixed) {
        // handler for processing mixed contents.
        loaders.put(TEXT_HANDLER,
            new ChildLoader(new MixedTextLoader(recv),null));
    }

    if(domHandler!=null) {
        loaders.put(CATCH_ALL,
            new ChildLoader(new WildcardLoader(domHandler,wcMode),recv));
    }
}
 
Example 3
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
    final int offset = chain.allocateOffset();

    Receiver recv = new ReceiverImpl(offset);

    for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) {
        final JaxBeanInfo beanInfo = n.getValue();
        loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv));
    }

    if(isMixed) {
        // handler for processing mixed contents.
        loaders.put(TEXT_HANDLER,
            new ChildLoader(new MixedTextLoader(recv),null));
    }

    if(domHandler!=null) {
        loaders.put(CATCH_ALL,
            new ChildLoader(new WildcardLoader(domHandler,wcMode),recv));
    }
}
 
Example 4
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
    final int offset = chain.allocateOffset();

    Receiver recv = new ReceiverImpl(offset);

    for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) {
        final JaxBeanInfo beanInfo = n.getValue();
        loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv));
    }

    if(isMixed) {
        // handler for processing mixed contents.
        loaders.put(TEXT_HANDLER,
            new ChildLoader(new MixedTextLoader(recv),null));
    }

    if(domHandler!=null) {
        loaders.put(CATCH_ALL,
            new ChildLoader(new WildcardLoader(domHandler,wcMode),recv));
    }
}
 
Example 5
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
    final int offset = chain.allocateOffset();

    Receiver recv = new ReceiverImpl(offset);

    for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) {
        final JaxBeanInfo beanInfo = n.getValue();
        loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv));
    }

    if(isMixed) {
        // handler for processing mixed contents.
        loaders.put(TEXT_HANDLER,
            new ChildLoader(new MixedTextLoader(recv),null));
    }

    if(domHandler!=null) {
        loaders.put(CATCH_ALL,
            new ChildLoader(new WildcardLoader(domHandler,wcMode),recv));
    }
}
 
Example 6
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
    final int offset = chain.allocateOffset();

    Receiver recv = new ReceiverImpl(offset);

    for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) {
        final JaxBeanInfo beanInfo = n.getValue();
        loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv));
    }

    if(isMixed) {
        // handler for processing mixed contents.
        loaders.put(TEXT_HANDLER,
            new ChildLoader(new MixedTextLoader(recv),null));
    }

    if(domHandler!=null) {
        loaders.put(CATCH_ALL,
            new ChildLoader(new WildcardLoader(domHandler,wcMode),recv));
    }
}
 
Example 7
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
    final int offset = chain.allocateOffset();

    Receiver recv = new ReceiverImpl(offset);

    for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) {
        final JaxBeanInfo beanInfo = n.getValue();
        loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv));
    }

    if(isMixed) {
        // handler for processing mixed contents.
        loaders.put(TEXT_HANDLER,
            new ChildLoader(new MixedTextLoader(recv),null));
    }

    if(domHandler!=null) {
        loaders.put(CATCH_ALL,
            new ChildLoader(new WildcardLoader(domHandler,wcMode),recv));
    }
}
 
Example 8
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
    final int offset = chain.allocateOffset();

    Receiver recv = new ReceiverImpl(offset);

    for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) {
        final JaxBeanInfo beanInfo = n.getValue();
        loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv));
    }

    if(isMixed) {
        // handler for processing mixed contents.
        loaders.put(TEXT_HANDLER,
            new ChildLoader(new MixedTextLoader(recv),null));
    }

    if(domHandler!=null) {
        loaders.put(CATCH_ALL,
            new ChildLoader(new WildcardLoader(domHandler,wcMode),recv));
    }
}
 
Example 9
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    ChildLoader child = children.get(ea.uri,ea.local);
    if (child == null) {
        child = children.get(CATCH_ALL);
    }
    if (child == null) {
        super.childElement(state,ea);
        return;
    }
    state.setLoader(child.loader);
    state.setReceiver(child.receiver);
}
 
Example 10
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
    for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet())
        handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc));

    if(domHandler!=null)
        handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc));

}
 
Example 11
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
    if(loader==null) {
        // this has to be done lazily to avoid cyclic reference issue
        UnmarshallerChain c = new UnmarshallerChain(context);
        QNameMap<ChildLoader> result = new QNameMap<ChildLoader>();
        property.buildChildElementUnmarshallers(c,result);
        if(result.size()==1)
            // for ElementBeanInfoImpl created from RuntimeElementInfo
            this.loader = new IntercepterLoader(result.getOne().getValue().loader);
        else
            // for special ElementBeanInfoImpl only used for marshalling
            this.loader = Discarder.INSTANCE;
    }
    return loader;
}
 
Example 12
Source Project: jdk8u60   Source File: ArrayERProperty.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    ChildLoader child = children.get(ea.uri,ea.local);
    if (child == null) {
        child = children.get(CATCH_ALL);
    }
    if (child == null) {
        super.childElement(state,ea);
        return;
    }
    state.setLoader(child.loader);
    state.setReceiver(child.receiver);
}
 
Example 13
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
    for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet())
        handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc));

    if(domHandler!=null)
        handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc));

}
 
Example 14
Source Project: jdk8u60   Source File: ElementBeanInfoImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
    if(loader==null) {
        // this has to be done lazily to avoid cyclic reference issue
        UnmarshallerChain c = new UnmarshallerChain(context);
        QNameMap<ChildLoader> result = new QNameMap<ChildLoader>();
        property.buildChildElementUnmarshallers(c,result);
        if(result.size()==1)
            // for ElementBeanInfoImpl created from RuntimeElementInfo
            this.loader = new IntercepterLoader(result.getOne().getValue().loader);
        else
            // for special ElementBeanInfoImpl only used for marshalling
            this.loader = Discarder.INSTANCE;
    }
    return loader;
}
 
Example 15
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    ChildLoader child = children.get(ea.uri,ea.local);
    if (child == null) {
        child = children.get(CATCH_ALL);
    }
    if (child == null) {
        super.childElement(state,ea);
        return;
    }
    state.setLoader(child.loader);
    state.setReceiver(child.receiver);
}
 
Example 16
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
    for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet())
        handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc));

    if(domHandler!=null)
        handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc));

}
 
Example 17
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
    if(loader==null) {
        // this has to be done lazily to avoid cyclic reference issue
        UnmarshallerChain c = new UnmarshallerChain(context);
        QNameMap<ChildLoader> result = new QNameMap<ChildLoader>();
        property.buildChildElementUnmarshallers(c,result);
        if(result.size()==1)
            // for ElementBeanInfoImpl created from RuntimeElementInfo
            this.loader = new IntercepterLoader(result.getOne().getValue().loader);
        else
            // for special ElementBeanInfoImpl only used for marshalling
            this.loader = Discarder.INSTANCE;
    }
    return loader;
}
 
Example 18
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    ChildLoader child = children.get(ea.uri,ea.local);
    if (child == null) {
        child = children.get(CATCH_ALL);
    }
    if (child == null) {
        super.childElement(state,ea);
        return;
    }
    state.setLoader(child.loader);
    state.setReceiver(child.receiver);
}
 
Example 19
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
    for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet())
        handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc));

    if(domHandler!=null)
        handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc));

}
 
Example 20
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
    if(loader==null) {
        // this has to be done lazily to avoid cyclic reference issue
        UnmarshallerChain c = new UnmarshallerChain(context);
        QNameMap<ChildLoader> result = new QNameMap<ChildLoader>();
        property.buildChildElementUnmarshallers(c,result);
        if(result.size()==1)
            // for ElementBeanInfoImpl created from RuntimeElementInfo
            this.loader = new IntercepterLoader(result.getOne().getValue().loader);
        else
            // for special ElementBeanInfoImpl only used for marshalling
            this.loader = Discarder.INSTANCE;
    }
    return loader;
}
 
Example 21
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
    for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet())
        handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc));

    if(domHandler!=null)
        handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc));

}
 
Example 22
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
    if(loader==null) {
        // this has to be done lazily to avoid cyclic reference issue
        UnmarshallerChain c = new UnmarshallerChain(context);
        QNameMap<ChildLoader> result = new QNameMap<ChildLoader>();
        property.buildChildElementUnmarshallers(c,result);
        if(result.size()==1)
            // for ElementBeanInfoImpl created from RuntimeElementInfo
            this.loader = new IntercepterLoader(result.getOne().getValue().loader);
        else
            // for special ElementBeanInfoImpl only used for marshalling
            this.loader = Discarder.INSTANCE;
    }
    return loader;
}
 
Example 23
Source Project: hottub   Source File: ArrayERProperty.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    ChildLoader child = children.get(ea.uri,ea.local);
    if (child == null) {
        child = children.get(CATCH_ALL);
    }
    if (child == null) {
        super.childElement(state,ea);
        return;
    }
    state.setLoader(child.loader);
    state.setReceiver(child.receiver);
}
 
Example 24
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
    if(loader==null) {
        // this has to be done lazily to avoid cyclic reference issue
        UnmarshallerChain c = new UnmarshallerChain(context);
        QNameMap<ChildLoader> result = new QNameMap<ChildLoader>();
        property.buildChildElementUnmarshallers(c,result);
        if(result.size()==1)
            // for ElementBeanInfoImpl created from RuntimeElementInfo
            this.loader = new IntercepterLoader(result.getOne().getValue().loader);
        else
            // for special ElementBeanInfoImpl only used for marshalling
            this.loader = Discarder.INSTANCE;
    }
    return loader;
}
 
Example 25
Source Project: hottub   Source File: ElementBeanInfoImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
    if(loader==null) {
        // this has to be done lazily to avoid cyclic reference issue
        UnmarshallerChain c = new UnmarshallerChain(context);
        QNameMap<ChildLoader> result = new QNameMap<ChildLoader>();
        property.buildChildElementUnmarshallers(c,result);
        if(result.size()==1)
            // for ElementBeanInfoImpl created from RuntimeElementInfo
            this.loader = new IntercepterLoader(result.getOne().getValue().loader);
        else
            // for special ElementBeanInfoImpl only used for marshalling
            this.loader = Discarder.INSTANCE;
    }
    return loader;
}
 
Example 26
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    ChildLoader child = children.get(ea.uri,ea.local);
    if (child == null) {
        child = children.get(CATCH_ALL);
    }
    if (child == null) {
        super.childElement(state,ea);
        return;
    }
    state.loader = child.loader;
    state.receiver = child.receiver;
}
 
Example 27
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
    for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet())
        handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc));

    if(domHandler!=null)
        handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc));

}
 
Example 28
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
    if(loader==null) {
        // this has to be done lazily to avoid cyclic reference issue
        UnmarshallerChain c = new UnmarshallerChain(context);
        QNameMap<ChildLoader> result = new QNameMap<ChildLoader>();
        property.buildChildElementUnmarshallers(c,result);
        if(result.size()==1)
            // for ElementBeanInfoImpl created from RuntimeElementInfo
            this.loader = new IntercepterLoader(result.getOne().getValue().loader);
        else
            // for special ElementBeanInfoImpl only used for marshalling
            this.loader = Discarder.INSTANCE;
    }
    return loader;
}
 
Example 29
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));
}
 
Example 30
Source Project: TencentKona-8   Source File: ValueProperty.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void buildChildElementUnmarshallers(UnmarshallerChain chainElem, QNameMap<ChildLoader> handlers) {
    handlers.put(StructureLoaderBuilder.TEXT_HANDLER,
            new ChildLoader(new ValuePropertyLoader(xacc),null));
}