Java Code Examples for com.sun.xml.internal.bind.DatatypeConverterImpl#_parseBoolean

The following examples show how to use com.sun.xml.internal.bind.DatatypeConverterImpl#_parseBoolean . 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: XsiNilLoader.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
    int idx = ea.atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil");

    if (idx!=-1) {
        Boolean b = DatatypeConverterImpl._parseBoolean(ea.atts.getValue(idx));

        if (b != null && b) {
            onNil(state);
            boolean hasOtherAttributes = (ea.atts.getLength() - 1) > 0;
            // see issues 6759703 and 565 - need to preserve attributes even if the element is nil; only when the type is stored in JAXBElement
            if (!(hasOtherAttributes && (state.getPrev().getTarget() instanceof JAXBElement))) {
                return Discarder.INSTANCE;
            }
        }
    }
    return defaultLoader;
}
 
Example 2
Source File: XsiNilLoader.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
    int idx = ea.atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil");

    if (idx!=-1) {
        Boolean b = DatatypeConverterImpl._parseBoolean(ea.atts.getValue(idx));

        if (b != null && b) {
            onNil(state);
            boolean hasOtherAttributes = (ea.atts.getLength() - 1) > 0;
            // see issues 6759703 and 565 - need to preserve attributes even if the element is nil; only when the type is stored in JAXBElement
            if (!(hasOtherAttributes && (state.prev.target instanceof JAXBElement))) {
                return Discarder.INSTANCE;
            }
        }
    }
    return defaultLoader;
}
 
Example 3
Source File: XsiNilLoader.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
    int idx = ea.atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil");

    if (idx!=-1) {
        Boolean b = DatatypeConverterImpl._parseBoolean(ea.atts.getValue(idx));

        if (b != null && b) {
            onNil(state);
            boolean hasOtherAttributes = (ea.atts.getLength() - 1) > 0;
            // see issues 6759703 and 565 - need to preserve attributes even if the element is nil; only when the type is stored in JAXBElement
            if (!(hasOtherAttributes && (state.getPrev().getTarget() instanceof JAXBElement))) {
                return Discarder.INSTANCE;
            }
        }
    }
    return defaultLoader;
}
 
Example 4
Source File: XsiNilLoader.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
    int idx = ea.atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil");

    if (idx!=-1) {
        Boolean b = DatatypeConverterImpl._parseBoolean(ea.atts.getValue(idx));

        if (b != null && b) {
            onNil(state);
            boolean hasOtherAttributes = (ea.atts.getLength() - 1) > 0;
            // see issues 6759703 and 565 - need to preserve attributes even if the element is nil; only when the type is stored in JAXBElement
            if (!(hasOtherAttributes && (state.getPrev().getTarget() instanceof JAXBElement))) {
                return Discarder.INSTANCE;
            }
        }
    }
    return defaultLoader;
}
 
Example 5
Source File: XsiNilLoader.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
    int idx = ea.atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil");

    if (idx!=-1) {
        Boolean b = DatatypeConverterImpl._parseBoolean(ea.atts.getValue(idx));

        if (b != null && b) {
            onNil(state);
            boolean hasOtherAttributes = (ea.atts.getLength() - 1) > 0;
            // see issues 6759703 and 565 - need to preserve attributes even if the element is nil; only when the type is stored in JAXBElement
            if (!(hasOtherAttributes && (state.getPrev().getTarget() instanceof JAXBElement))) {
                return Discarder.INSTANCE;
            }
        }
    }
    return defaultLoader;
}
 
Example 6
Source File: XsiNilLoader.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
    int idx = ea.atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil");

    if (idx!=-1) {
        Boolean b = DatatypeConverterImpl._parseBoolean(ea.atts.getValue(idx));

        if (b != null && b) {
            onNil(state);
            boolean hasOtherAttributes = (ea.atts.getLength() - 1) > 0;
            // see issues 6759703 and 565 - need to preserve attributes even if the element is nil; only when the type is stored in JAXBElement
            if (!(hasOtherAttributes && (state.getPrev().getTarget() instanceof JAXBElement))) {
                return Discarder.INSTANCE;
            }
        }
    }
    return defaultLoader;
}
 
Example 7
Source File: XsiNilLoader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
    int idx = ea.atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil");

    if (idx!=-1) {
        Boolean b = DatatypeConverterImpl._parseBoolean(ea.atts.getValue(idx));

        if (b != null && b) {
            onNil(state);
            boolean hasOtherAttributes = (ea.atts.getLength() - 1) > 0;
            // see issues 6759703 and 565 - need to preserve attributes even if the element is nil; only when the type is stored in JAXBElement
            if (!(hasOtherAttributes && (state.getPrev().getTarget() instanceof JAXBElement))) {
                return Discarder.INSTANCE;
            }
        }
    }
    return defaultLoader;
}
 
Example 8
Source File: TransducedAccessor_field_Boolean.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void parse(Object o, CharSequence lexical) {
    Boolean b = DatatypeConverterImpl._parseBoolean(lexical);

    if(b != null)
        ((Bean)o).f_boolean=b;
}
 
Example 9
Source File: TransducedAccessor_field_Boolean.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public void parse(Object o, CharSequence lexical) {
    Boolean b = DatatypeConverterImpl._parseBoolean(lexical);

    if(b != null)
        ((Bean)o).f_boolean=b;
}
 
Example 10
Source File: TransducedAccessor_field_Boolean.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void parse(Object o, CharSequence lexical) {
    Boolean b = DatatypeConverterImpl._parseBoolean(lexical);

    if(b != null)
        ((Bean)o).f_boolean=b;
}
 
Example 11
Source File: RuntimeBuiltinLeafInfoImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Boolean parse(CharSequence text) {
    return DatatypeConverterImpl._parseBoolean(text);
}
 
Example 12
Source File: TransducedAccessor_field_Boolean.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public void parse(Object o, CharSequence lexical) {
    Boolean b = DatatypeConverterImpl._parseBoolean(lexical);

    if(b != null)
        ((Bean)o).f_boolean=b;
}
 
Example 13
Source File: RuntimeBuiltinLeafInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Boolean parse(CharSequence text) {
    return DatatypeConverterImpl._parseBoolean(text);
}
 
Example 14
Source File: RuntimeBuiltinLeafInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Boolean parse(CharSequence text) {
    return DatatypeConverterImpl._parseBoolean(text);
}
 
Example 15
Source File: RuntimeBuiltinLeafInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Boolean parse(CharSequence text) {
    return DatatypeConverterImpl._parseBoolean(text);
}
 
Example 16
Source File: TransducedAccessor_field_Boolean.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void parse(Object o, CharSequence lexical) {
    Boolean b = DatatypeConverterImpl._parseBoolean(lexical);

    if(b != null)
        ((Bean)o).f_boolean=b;
}
 
Example 17
Source File: RuntimeBuiltinLeafInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Boolean parse(CharSequence text) {
    return DatatypeConverterImpl._parseBoolean(text);
}
 
Example 18
Source File: TransducedAccessor_field_Boolean.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public void parse(Object o, CharSequence lexical) {
    Boolean b = DatatypeConverterImpl._parseBoolean(lexical);

    if(b != null)
        ((Bean)o).f_boolean=b;
}
 
Example 19
Source File: RuntimeBuiltinLeafInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Boolean parse(CharSequence text) {
    return DatatypeConverterImpl._parseBoolean(text);
}
 
Example 20
Source File: TransducedAccessor_field_Boolean.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public void parse(Object o, CharSequence lexical) {
    Boolean b = DatatypeConverterImpl._parseBoolean(lexical);

    if(b != null)
        ((Bean)o).f_boolean=b;
}