01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19:
20: package org.apache.axis2.jaxws.description.builder;
21:
22: import java.lang.annotation.Annotation;
23:
24: public class SoapBindingAnnot implements javax.jws.soap.SOAPBinding {
25:
26: private Style style = Style.DOCUMENT;
27: private Use use = Use.LITERAL;
28: private ParameterStyle parameterStyle = ParameterStyle.WRAPPED;
29:
30: /** A SoapBindingAnnot cannot be instantiated. */
31: private SoapBindingAnnot() {
32:
33: }
34:
35: public static SoapBindingAnnot createSoapBindingAnnotImpl() {
36: return new SoapBindingAnnot();
37: }
38:
39: public Style style() {
40: return this .style;
41: }
42:
43: public Use use() {
44: return this .use;
45: }
46:
47: public ParameterStyle parameterStyle() {
48: return this .parameterStyle;
49: }
50:
51: /** @param parameterStyle The parameterStyle to set. */
52: public void setParameterStyle(ParameterStyle parameterStyle) {
53: this .parameterStyle = parameterStyle;
54: }
55:
56: /** @param style The style to set. */
57: public void setStyle(Style style) {
58: this .style = style;
59: }
60:
61: /** @param use The use to set. */
62: public void setUse(Use use) {
63: this .use = use;
64: }
65:
66: public Class<Annotation> annotationType() {
67: return Annotation.class;
68: }
69:
70: /**
71: * Convenience method for unit testing. We will print all of the
72: * data members here.
73: */
74: public String toString() {
75: StringBuffer sb = new StringBuffer();
76: String newLine = "\n";
77: sb.append(newLine);
78: sb.append("@SOAPBinding.style= " + style.toString());
79: sb.append("@SOAPBinding.parameterStyle= "
80: + parameterStyle.toString());
81: sb.append("@SOAPBinding.use= " + use.toString());
82: sb.append(newLine);
83: return sb.toString();
84: }
85: }
|