com.sun.xml.internal.bind.api.Bridge Java Examples

The following examples show how to use com.sun.xml.internal.bind.api.Bridge. 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: StreamMessage.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    if(!hasPayload())
        return null;
    assert unconsumed();
    T r = bridge.unmarshal(reader,
        hasAttachments() ? new AttachmentUnmarshallerImpl(getAttachments()) : null);
    XMLStreamReaderUtil.readRest(reader);
    XMLStreamReaderUtil.close(reader);
    XMLStreamReaderFactory.recycle(reader);
    return r;
}
 
Example #2
Source File: WrapperBridge.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static CompositeStructure convert(Object o) {
    WrapperComposite w = (WrapperComposite) o;
    CompositeStructure cs = new CompositeStructure();
    cs.values = w.values;
    cs.bridges = new Bridge[w.bridges.length];
    for (int i = 0; i < cs.bridges.length; i++) {
        cs.bridges[i] = ((BridgeWrapper) w.bridges[i]).getBridge();
    }
    return cs;
}
 
Example #3
Source File: StreamMessage.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    if(!hasPayload())
        return null;
    assert unconsumed();
    T r = bridge.unmarshal(reader,
        hasAttachments() ? new AttachmentUnmarshallerImpl(getAttachments()) : null);
    XMLStreamReaderUtil.readRest(reader);
    XMLStreamReaderUtil.close(reader);
    XMLStreamReaderFactory.recycle(reader);
    return r;
}
 
Example #4
Source File: SAAJMessage.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    access();
    if (payload != null)
        return bridge.unmarshal(payload,hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null);
    return null;
}
 
Example #5
Source File: AbstractHeaderImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** @deprecated */
public <T> T readAsJAXB(Bridge<T> bridge) throws JAXBException {
    try {
        return bridge.unmarshal(readHeader());
    } catch (XMLStreamException e) {
        throw new JAXBException(e);
    }
}
 
Example #6
Source File: SAAJMessage.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    access();
    if (payload != null)
        return bridge.unmarshal(payload,hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null);
    return null;
}
 
Example #7
Source File: StreamMessage.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    if(!hasPayload())
        return null;
    assert unconsumed();
    T r = bridge.unmarshal(reader,
        hasAttachments() ? new AttachmentUnmarshallerImpl(getAttachments()) : null);
    XMLStreamReaderUtil.readRest(reader);
    XMLStreamReaderUtil.close(reader);
    XMLStreamReaderFactory.recycle(reader);
    return r;
}
 
Example #8
Source File: WrapperBridge.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
static CompositeStructure convert(Object o) {
    WrapperComposite w = (WrapperComposite) o;
    CompositeStructure cs = new CompositeStructure();
    cs.values = w.values;
    cs.bridges = new Bridge[w.bridges.length];
    for (int i = 0; i < cs.bridges.length; i++) {
        cs.bridges[i] = ((BridgeWrapper) w.bridges[i]).getBridge();
    }
    return cs;
}
 
Example #9
Source File: StreamMessage.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    if(!hasPayload())
        return null;
    assert unconsumed();
    T r = bridge.unmarshal(reader,
        hasAttachments() ? new AttachmentUnmarshallerImpl(getAttachments()) : null);
    XMLStreamReaderUtil.readRest(reader);
    XMLStreamReaderUtil.close(reader);
    XMLStreamReaderFactory.recycle(reader);
    return r;
}
 
Example #10
Source File: SAAJMessage.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    access();
    if (payload != null)
        return bridge.unmarshal(payload,hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null);
    return null;
}
 
Example #11
Source File: StreamMessage.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    if(!hasPayload())
        return null;
    assert unconsumed();
    T r = bridge.unmarshal(reader,
        hasAttachments() ? new AttachmentUnmarshallerImpl(getAttachments()) : null);
    XMLStreamReaderUtil.readRest(reader);
    XMLStreamReaderUtil.close(reader);
    XMLStreamReaderFactory.recycle(reader);
    return r;
}
 
Example #12
Source File: ParameterImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**  @deprecated  */
public Bridge getBridge() {
    return getOwner().getBridge(typeReference);
}
 
Example #13
Source File: WrapperBridge.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public WrapperBridge(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge<T> b) {
    parent = p;
    bridge = b;
}
 
Example #14
Source File: DOMMessage.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    return bridge.unmarshal(payload,
        hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null);
}
 
Example #15
Source File: ProtocolSourceMessage.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    return sm.readPayloadAsJAXB(bridge);
}
 
Example #16
Source File: JAXBHeader.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/** @deprecated */
public <T> T readAsJAXB(Bridge<T> bridge) throws JAXBException {
    return bridge.unmarshal(new JAXBBridgeSource(this.bridge,jaxbObject));
}
 
Example #17
Source File: XMLMessage.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    return getMessage().readPayloadAsJAXB(bridge);
}
 
Example #18
Source File: AbstractSEIModelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private void createBridgeMap(List<TypeReference> types) {
    for (TypeReference type : types) {
        Bridge bridge = jaxbContext.createBridge(type);
        bridgeMap.put(type, bridge);
    }
}
 
Example #19
Source File: WrapperBridge.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public WrapperBridge(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge<T> b) {
    parent = p;
    bridge = b;
}
 
Example #20
Source File: ParameterImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**  @deprecated  */
public Bridge getBridge() {
    return getOwner().getBridge(typeReference);
}
 
Example #21
Source File: AbstractMessageImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/** @deprecated */
@Override
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    return bridge.unmarshal(readPayloadAsSource(),
        hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null );
}
 
Example #22
Source File: JAXBContextImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Bridge createBridge(TypeReference ref) {
    return bridges.get(ref);
}
 
Example #23
Source File: XMLMessage.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    return getMessage().readPayloadAsJAXB(bridge);
}
 
Example #24
Source File: XMLMessage.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/** @deprecated */
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    return getMessage().readPayloadAsJAXB(bridge);
}
 
Example #25
Source File: JAXBContextImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Bridge createBridge(TypeReference ref) {
    return bridges.get(ref);
}
 
Example #26
Source File: WrapperBridge.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public WrapperBridge(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge<T> b) {
    parent = p;
    bridge = b;
}
 
Example #27
Source File: MessageWrapper.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
    return delegate.readPayloadAsJAXB(bridge);
}
 
Example #28
Source File: ParameterImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**  @deprecated  */
public Bridge getBridge() {
    return getOwner().getBridge(typeReference);
}
 
Example #29
Source File: CheckedExceptionImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/** @deprecated */
    public Bridge getBridge() {
//TODO        return getOwner().getBridge(detail);
        return null;
    }
 
Example #30
Source File: JAXBHeader.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/** @deprecated */
public <T> T readAsJAXB(Bridge<T> bridge) throws JAXBException {
    return bridge.unmarshal(new JAXBBridgeSource(this.bridge,jaxbObject));
}