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