1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/WrapperBridge.java Thu Apr 04 19:05:24 2013 -0700 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/WrapperBridge.java Tue Apr 09 14:51:13 2013 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -49,92 +49,108 @@ 1.11 1.12 public class WrapperBridge<T> implements XMLBridge<T> { 1.13 1.14 - private JAXBRIContextWrapper parent; 1.15 - private com.sun.xml.internal.bind.api.Bridge<T> bridge; 1.16 + private JAXBRIContextWrapper parent; 1.17 + private com.sun.xml.internal.bind.api.Bridge<T> bridge; 1.18 1.19 - public WrapperBridge(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge<T> b) { 1.20 - parent = p; 1.21 - bridge = b; 1.22 + public WrapperBridge(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge<T> b) { 1.23 + parent = p; 1.24 + bridge = b; 1.25 + } 1.26 + 1.27 + @Override 1.28 + public BindingContext context() { 1.29 + return parent; 1.30 + } 1.31 + 1.32 + @Override 1.33 + public boolean equals(Object obj) { 1.34 + return bridge.equals(obj); 1.35 + } 1.36 + 1.37 + @Override 1.38 + public TypeInfo getTypeInfo() { 1.39 + return parent.typeInfo(bridge.getTypeReference()); 1.40 + } 1.41 + 1.42 + @Override 1.43 + public int hashCode() { 1.44 + return bridge.hashCode(); 1.45 + } 1.46 + 1.47 + static CompositeStructure convert(Object o) { 1.48 + WrapperComposite w = (WrapperComposite) o; 1.49 + CompositeStructure cs = new CompositeStructure(); 1.50 + cs.values = w.values; 1.51 + cs.bridges = new Bridge[w.bridges.length]; 1.52 + for (int i = 0; i < cs.bridges.length; i++) { 1.53 + cs.bridges[i] = ((BridgeWrapper) w.bridges[i]).getBridge(); 1.54 } 1.55 + return cs; 1.56 + } 1.57 1.58 - public BindingContext context() { 1.59 - return parent; 1.60 - } 1.61 + @Override 1.62 + public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException { 1.63 + bridge.marshal((T) convert(object), contentHandler, am); 1.64 +// bridge.marshal(object, contentHandler, am); 1.65 + } 1.66 1.67 - public boolean equals(Object obj) { 1.68 - return bridge.equals(obj); 1.69 - } 1.70 - 1.71 - public TypeInfo getTypeInfo() { 1.72 - return parent.typeInfo(bridge.getTypeReference()); 1.73 - } 1.74 - 1.75 - public int hashCode() { 1.76 - return bridge.hashCode(); 1.77 - } 1.78 - 1.79 - static CompositeStructure convert(Object o) { 1.80 - WrapperComposite w = (WrapperComposite) o; 1.81 - CompositeStructure cs = new CompositeStructure(); 1.82 - cs.values = w.values; 1.83 - cs.bridges = new Bridge[w.bridges.length]; 1.84 - for (int i = 0; i < cs.bridges.length; i++) 1.85 - cs.bridges[i] = ((BridgeWrapper)w.bridges[i]).getBridge(); 1.86 - return cs; 1.87 - } 1.88 - 1.89 - public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException { 1.90 - bridge.marshal((T) convert(object), contentHandler, am); 1.91 -// bridge.marshal(object, contentHandler, am); 1.92 - } 1.93 - 1.94 - public void marshal(T object, Node output) throws JAXBException { 1.95 - throw new UnsupportedOperationException(); 1.96 + @Override 1.97 + public void marshal(T object, Node output) throws JAXBException { 1.98 + throw new UnsupportedOperationException(); 1.99 // bridge.marshal(object, output); 1.100 // bridge.marshal((T) convert(object), output); 1.101 - } 1.102 + } 1.103 1.104 - public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException { 1.105 - bridge.marshal((T) convert(object), output, nsContext, am); 1.106 - } 1.107 + @Override 1.108 + public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException { 1.109 + bridge.marshal((T) convert(object), output, nsContext, am); 1.110 + } 1.111 1.112 - public final void marshal(T object, Result result) throws JAXBException { 1.113 - throw new UnsupportedOperationException(); 1.114 + @Override 1.115 + public final void marshal(T object, Result result) throws JAXBException { 1.116 + throw new UnsupportedOperationException(); 1.117 // bridge.marshal(object, result); 1.118 - } 1.119 + } 1.120 1.121 - public final void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException { 1.122 - bridge.marshal((T) convert(object), output, am); 1.123 - } 1.124 + @Override 1.125 + public final void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException { 1.126 + bridge.marshal((T) convert(object), output, am); 1.127 + } 1.128 1.129 - public String toString() { 1.130 - return BridgeWrapper.class.getName() + " : " + bridge.toString(); 1.131 - } 1.132 + @Override 1.133 + public String toString() { 1.134 + return BridgeWrapper.class.getName() + " : " + bridge.toString(); 1.135 + } 1.136 1.137 - public final T unmarshal(InputStream in) throws JAXBException { 1.138 - //EndpointArgumentsBuilder.RpcLit.readRequest 1.139 - throw new UnsupportedOperationException(); 1.140 + @Override 1.141 + public final T unmarshal(InputStream in) throws JAXBException { 1.142 + //EndpointArgumentsBuilder.RpcLit.readRequest 1.143 + throw new UnsupportedOperationException(); 1.144 // return bridge.unmarshal(in); 1.145 - } 1.146 + } 1.147 1.148 - public final T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException { 1.149 - //EndpointArgumentsBuilder.RpcLit.readRequest 1.150 - throw new UnsupportedOperationException(); 1.151 + @Override 1.152 + public final T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException { 1.153 + //EndpointArgumentsBuilder.RpcLit.readRequest 1.154 + throw new UnsupportedOperationException(); 1.155 // return bridge.unmarshal(n, au); 1.156 - } 1.157 + } 1.158 1.159 - public final T unmarshal(Source in, AttachmentUnmarshaller au) throws JAXBException { 1.160 - //EndpointArgumentsBuilder.RpcLit.readRequest 1.161 - throw new UnsupportedOperationException(); 1.162 + @Override 1.163 + public final T unmarshal(Source in, AttachmentUnmarshaller au) throws JAXBException { 1.164 + //EndpointArgumentsBuilder.RpcLit.readRequest 1.165 + throw new UnsupportedOperationException(); 1.166 // return bridge.unmarshal(in, au); 1.167 - } 1.168 + } 1.169 1.170 - public final T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) throws JAXBException { 1.171 - //EndpointArgumentsBuilder.RpcLit.readRequest 1.172 - throw new UnsupportedOperationException(); 1.173 + @Override 1.174 + public final T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) throws JAXBException { 1.175 + //EndpointArgumentsBuilder.RpcLit.readRequest 1.176 + throw new UnsupportedOperationException(); 1.177 // return bridge.unmarshal(in, au); 1.178 - } 1.179 + } 1.180 1.181 + @Override 1.182 public boolean supportOutputStream() { 1.183 return true; 1.184 }