Java Code Examples for com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo#getLoader()

The following examples show how to use com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo#getLoader() . 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
Source File: UnmarshallingContext.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives the root element and determines how to start
 * unmarshalling.
 */
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    Loader loader = state.getContext().selectRootLoader(state,ea);
    if(loader!=null) {
        state.loader = loader;
        state.receiver = this;
        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;
}
 
Example 2
Source File: UnmarshallingContext.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives the root element and determines how to start
 * unmarshalling.
 */
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    Loader loader = state.getContext().selectRootLoader(state,ea);
    if(loader!=null) {
        state.loader = loader;
        state.receiver = this;
        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;
}
 
Example 3
Source File: UnmarshallingContext.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives the root element and determines how to start
 * unmarshalling.
 */
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    Loader loader = state.getContext().selectRootLoader(state,ea);
    if(loader!=null) {
        state.loader = loader;
        state.receiver = this;
        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;
}
 
Example 4
Source File: UnmarshallingContext.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives the root element and determines how to start
 * unmarshalling.
 */
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    Loader loader = state.getContext().selectRootLoader(state,ea);
    if(loader!=null) {
        state.loader = loader;
        state.receiver = this;
        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;
}
 
Example 5
Source File: UnmarshallingContext.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives the root element and determines how to start
 * unmarshalling.
 */
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    Loader loader = state.getContext().selectRootLoader(state,ea);
    if(loader!=null) {
        state.loader = loader;
        state.receiver = this;
        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;
}
 
Example 6
Source File: UnmarshallingContext.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives the root element and determines how to start
 * unmarshalling.
 */
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    Loader loader = state.getContext().selectRootLoader(state,ea);
    if(loader!=null) {
        state.loader = loader;
        state.receiver = this;
        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;
}
 
Example 7
Source File: UnmarshallingContext.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives the root element and determines how to start
 * unmarshalling.
 */
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    Loader loader = state.getContext().selectRootLoader(state,ea);
    if(loader!=null) {
        state.loader = loader;
        state.receiver = this;
        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;
}
 
Example 8
Source File: UnmarshallingContext.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives the root element and determines how to start
 * unmarshalling.
 */
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    Loader loader = state.getContext().selectRootLoader(state,ea);
    if(loader!=null) {
        state.loader = loader;
        state.receiver = this;
        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;
}
 
Example 9
Source File: XsiTypeLoader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo);
    if(beanInfo==null)
        beanInfo = defaultBeanInfo;

    Loader loader = beanInfo.getLoader(null,false);
    state.setLoader(loader);
    loader.startElement(state,ea);
}
 
Example 10
Source File: XsiTypeLoader.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo);
    if(beanInfo==null)
        beanInfo = defaultBeanInfo;

    Loader loader = beanInfo.getLoader(null,false);
    state.setLoader(loader);
    loader.startElement(state,ea);
}
 
Example 11
Source File: XsiTypeLoader.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo);
    if(beanInfo==null)
        beanInfo = defaultBeanInfo;

    Loader loader = beanInfo.getLoader(null,false);
    state.setLoader(loader);
    loader.startElement(state,ea);
}
 
Example 12
Source File: XsiTypeLoader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo);
    if(beanInfo==null)
        beanInfo = defaultBeanInfo;

    Loader loader = beanInfo.getLoader(null,false);
    state.setLoader(loader);
    loader.startElement(state,ea);
}
 
Example 13
Source File: XsiTypeLoader.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo);
    if(beanInfo==null)
        beanInfo = defaultBeanInfo;

    Loader loader = beanInfo.getLoader(null,false);
    state.setLoader(loader);
    loader.startElement(state,ea);
}
 
Example 14
Source File: XsiTypeLoader.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo);
    if(beanInfo==null)
        beanInfo = defaultBeanInfo;

    Loader loader = beanInfo.getLoader(null,false);
    state.setLoader(loader);
    loader.startElement(state,ea);
}
 
Example 15
Source File: XsiTypeLoader.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo);
    if(beanInfo==null)
        beanInfo = defaultBeanInfo;

    Loader loader = beanInfo.getLoader(null,false);
    state.loader = loader;
    loader.startElement(state,ea);
}
 
Example 16
Source File: XsiTypeLoader.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo);
    if(beanInfo==null)
        beanInfo = defaultBeanInfo;

    Loader loader = beanInfo.getLoader(null,false);
    state.loader = loader;
    loader.startElement(state,ea);
}