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 javax.xml.ws.Service;
23: import java.lang.annotation.Annotation;
24:
25: public class ServiceModeAnnot implements javax.xml.ws.ServiceMode {
26:
27: private Service.Mode value = Service.Mode.PAYLOAD;
28:
29: /** A ServiceModeAnnot cannot be instantiated. */
30: private ServiceModeAnnot() {
31:
32: }
33:
34: private ServiceModeAnnot(Service.Mode value) {
35: this .value = value;
36: }
37:
38: public static ServiceModeAnnot createWebServiceAnnotImpl() {
39: return new ServiceModeAnnot();
40: }
41:
42: public static ServiceModeAnnot createWebServiceAnnotImpl(
43: Service.Mode value) {
44: return new ServiceModeAnnot(value);
45: }
46:
47: public Service.Mode value() {
48: return this .value;
49: }
50:
51: //hmm, should we really do this
52: public Class<Annotation> annotationType() {
53: return Annotation.class;
54: }
55:
56: //Setters
57: public void setValue(Service.Mode value) {
58: this .value = value;
59: }
60:
61: /** Convenience method for unit testing. We will print all of the data members here. */
62: public String toString() {
63: StringBuffer sb = new StringBuffer();
64: String newLine = "\n";
65: sb.append(newLine);
66: sb.append("@ServiceMode.value= " + value.toString());
67: sb.append(newLine);
68: return sb.toString();
69: }
70:
71: }
|