com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.State Java Examples

The following examples show how to use com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.State. 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: SingleMapNodeProperty.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    // create or obtain the Map object
    try {
        target.set((BeanT)state.getPrev().getTarget());
        map.set(acc.get(target.get()));
        depthCounter++;
        if(map.get() == null) {
            map.set(ClassFactory.create(mapImplClass));
        }
        map.get().clear();
        state.setTarget(map.get());
    } catch (AccessorException e) {
        // recover from error by setting a dummy Map that receives and discards the values
        handleGenericException(e,true);
        state.setTarget(new HashMap());
    }
}
 
Example #2
Source File: SingleMapNodeProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    // create or obtain the Map object
    try {
        target.set((BeanT)state.getPrev().getTarget());
        map.set(acc.get(target.get()));
        depthCounter++;
        if(map.get() == null) {
            map.set(ClassFactory.create(mapImplClass));
        }
        map.get().clear();
        state.setTarget(map.get());
    } catch (AccessorException e) {
        // recover from error by setting a dummy Map that receives and discards the values
        handleGenericException(e,true);
        state.setTarget(new HashMap());
    }
}
 
Example #3
Source File: SingleMapNodeProperty.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    // create or obtain the Map object
    try {
        target.set((BeanT)state.prev.target);
        map.set(acc.get(target.get()));
        depthCounter++;
        if(map.get() == null) {
            map.set(ClassFactory.create(mapImplClass));
        }
        map.get().clear();
        state.target = map.get();
    } catch (AccessorException e) {
        // recover from error by setting a dummy Map that receives and discards the values
        handleGenericException(e,true);
        state.target = new HashMap();
    }
}
 
Example #4
Source File: SingleMapNodeProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    // create or obtain the Map object
    try {
        BeanT target = (BeanT) state.getPrev().getTarget();
        ValueT mapValue = acc.get(target);
        if(mapValue == null)
            mapValue = ClassFactory.create(mapImplClass);
        else
            mapValue.clear();

        Stack.push(this.target, target);
        Stack.push(map, mapValue);
        state.setTarget(mapValue);
    } catch (AccessorException e) {
        // recover from error by setting a dummy Map that receives and discards the values
        handleGenericException(e,true);
        state.setTarget(new HashMap());
    }
}
 
Example #5
Source File: SingleMapNodeProperty.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    // create or obtain the Map object
    try {
        target.set((BeanT)state.getPrev().getTarget());
        map.set(acc.get(target.get()));
        depthCounter++;
        if(map.get() == null) {
            map.set(ClassFactory.create(mapImplClass));
        }
        map.get().clear();
        state.setTarget(map.get());
    } catch (AccessorException e) {
        // recover from error by setting a dummy Map that receives and discards the values
        handleGenericException(e,true);
        state.setTarget(new HashMap());
    }
}
 
Example #6
Source File: SingleMapNodeProperty.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    // create or obtain the Map object
    try {
        target.set((BeanT)state.prev.target);
        map.set(acc.get(target.get()));
        depthCounter++;
        if(map.get() == null) {
            map.set(ClassFactory.create(mapImplClass));
        }
        map.get().clear();
        state.target = map.get();
    } catch (AccessorException e) {
        // recover from error by setting a dummy Map that receives and discards the values
        handleGenericException(e,true);
        state.target = new HashMap();
    }
}
 
Example #7
Source File: SingleMapNodeProperty.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    // create or obtain the Map object
    try {
        target.set((BeanT)state.getPrev().getTarget());
        map.set(acc.get(target.get()));
        depthCounter++;
        if(map.get() == null) {
            map.set(ClassFactory.create(mapImplClass));
        }
        map.get().clear();
        state.setTarget(map.get());
    } catch (AccessorException e) {
        // recover from error by setting a dummy Map that receives and discards the values
        handleGenericException(e,true);
        state.setTarget(new HashMap());
    }
}
 
Example #8
Source File: SingleMapNodeProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    // create or obtain the Map object
    try {
        target.set((BeanT)state.getPrev().getTarget());
        map.set(acc.get(target.get()));
        depthCounter++;
        if(map.get() == null) {
            map.set(ClassFactory.create(mapImplClass));
        }
        map.get().clear();
        state.setTarget(map.get());
    } catch (AccessorException e) {
        // recover from error by setting a dummy Map that receives and discards the values
        handleGenericException(e,true);
        state.setTarget(new HashMap());
    }
}
 
Example #9
Source File: SingleMapNodeProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(entryTag)) {
        state.setLoader(entryLoader);
    } else {
        super.childElement(state,ea);
    }
}
 
Example #10
Source File: SingleMapNodeProperty.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void leaveElement(State state, TagName ea) throws SAXException {
    super.leaveElement(state, ea);
    try {
        acc.set(target.get(), map.get());
        if (--depthCounter == 0) {
            target.remove();
            map.remove();
        }
    } catch (AccessorException ex) {
        handleGenericException(ex,true);
    }
}
 
Example #11
Source File: SingleMapNodeProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(keyTag)) {
        state.setLoader(keyLoader);
        state.setReceiver(keyReceiver);
        return;
    }
    if(ea.matches(valueTag)) {
        state.setLoader(valueLoader);
        state.setReceiver(valueReceiver);
        return;
    }
    super.childElement(state,ea);
}
 
Example #12
Source File: SingleMapNodeProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void leaveElement(State state, TagName ea) throws SAXException {
    super.leaveElement(state, ea);
    try {
        acc.set(Stack.pop(target), Stack.pop(map));
    } catch (AccessorException ex) {
        handleGenericException(ex,true);
    }
}
 
Example #13
Source File: SingleMapNodeProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(entryTag)) {
        state.setLoader(entryLoader);
    } else {
        super.childElement(state,ea);
    }
}
 
Example #14
Source File: SingleMapNodeProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(keyTag)) {
        state.setLoader(keyLoader);
        state.setReceiver(keyReceiver);
        return;
    }
    if(ea.matches(valueTag)) {
        state.setLoader(valueLoader);
        state.setReceiver(valueReceiver);
        return;
    }
    super.childElement(state,ea);
}
 
Example #15
Source File: SingleMapNodeProperty.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void leaveElement(State state, TagName ea) throws SAXException {
    super.leaveElement(state, ea);
    try {
        acc.set(target.get(), map.get());
        if (--depthCounter == 0) {
            target.remove();
            map.remove();
        }
    } catch (AccessorException ex) {
        handleGenericException(ex,true);
    }
}
 
Example #16
Source File: SingleMapNodeProperty.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(entryTag)) {
        state.setLoader(entryLoader);
    } else {
        super.childElement(state,ea);
    }
}
 
Example #17
Source File: SingleMapNodeProperty.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(keyTag)) {
        state.setLoader(keyLoader);
        state.setReceiver(keyReceiver);
        return;
    }
    if(ea.matches(valueTag)) {
        state.setLoader(valueLoader);
        state.setReceiver(valueReceiver);
        return;
    }
    super.childElement(state,ea);
}
 
Example #18
Source File: SingleMapNodeProperty.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void leaveElement(State state, TagName ea) throws SAXException {
    super.leaveElement(state, ea);
    try {
        acc.set(target.get(), map.get());
        if (--depthCounter == 0) {
            target.remove();
            map.remove();
        }
    } catch (AccessorException ex) {
        handleGenericException(ex,true);
    }
}
 
Example #19
Source File: SingleMapNodeProperty.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(entryTag)) {
        state.loader = entryLoader;
    } else {
        super.childElement(state,ea);
    }
}
 
Example #20
Source File: SingleMapNodeProperty.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(keyTag)) {
        state.loader = keyLoader;
        state.receiver = keyReceiver;
        return;
    }
    if(ea.matches(valueTag)) {
        state.loader = valueLoader;
        state.receiver = valueReceiver;
        return;
    }
    super.childElement(state,ea);
}
 
Example #21
Source File: SingleMapNodeProperty.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void leaveElement(State state, TagName ea) throws SAXException {
    super.leaveElement(state, ea);
    try {
        acc.set(target.get(), map.get());
        if (--depthCounter == 0) {
            target.remove();
            map.remove();
        }
    } catch (AccessorException ex) {
        handleGenericException(ex,true);
    }
}
 
Example #22
Source File: SingleMapNodeProperty.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(entryTag)) {
        state.loader = entryLoader;
    } else {
        super.childElement(state,ea);
    }
}
 
Example #23
Source File: SingleMapNodeProperty.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(keyTag)) {
        state.loader = keyLoader;
        state.receiver = keyReceiver;
        return;
    }
    if(ea.matches(valueTag)) {
        state.loader = valueLoader;
        state.receiver = valueReceiver;
        return;
    }
    super.childElement(state,ea);
}
 
Example #24
Source File: SingleMapNodeProperty.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(entryTag)) {
        state.setLoader(entryLoader);
    } else {
        super.childElement(state,ea);
    }
}
 
Example #25
Source File: SingleMapNodeProperty.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(entryTag)) {
        state.setLoader(entryLoader);
    } else {
        super.childElement(state,ea);
    }
}
 
Example #26
Source File: SingleMapNodeProperty.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void leaveElement(State state, TagName ea) throws SAXException {
    super.leaveElement(state, ea);
    try {
        acc.set(target.get(), map.get());
        if (--depthCounter == 0) {
            target.remove();
            map.remove();
        }
    } catch (AccessorException ex) {
        handleGenericException(ex,true);
    }
}
 
Example #27
Source File: SingleMapNodeProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void leaveElement(State state, TagName ea) throws SAXException {
    super.leaveElement(state, ea);
    try {
        acc.set(target.get(), map.get());
        if (--depthCounter == 0) {
            target.remove();
            map.remove();
        }
    } catch (AccessorException ex) {
        handleGenericException(ex,true);
    }
}
 
Example #28
Source File: SingleMapNodeProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(keyTag)) {
        state.setLoader(keyLoader);
        state.setReceiver(keyReceiver);
        return;
    }
    if(ea.matches(valueTag)) {
        state.setLoader(valueLoader);
        state.setReceiver(valueReceiver);
        return;
    }
    super.childElement(state,ea);
}
 
Example #29
Source File: SingleMapNodeProperty.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(keyTag)) {
        state.setLoader(keyLoader);
        state.setReceiver(keyReceiver);
        return;
    }
    if(ea.matches(valueTag)) {
        state.setLoader(valueLoader);
        state.setReceiver(valueReceiver);
        return;
    }
    super.childElement(state,ea);
}
 
Example #30
Source File: SingleMapNodeProperty.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    if(ea.matches(keyTag)) {
        state.setLoader(keyLoader);
        state.setReceiver(keyReceiver);
        return;
    }
    if(ea.matches(valueTag)) {
        state.setLoader(valueLoader);
        state.setReceiver(valueReceiver);
        return;
    }
    super.childElement(state,ea);
}