001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */
019:
020: package org.apache.axis2.jaxws.description.builder;
021:
022: import java.lang.annotation.Annotation;
023:
024: public class ResponseWrapperAnnot implements
025: javax.xml.ws.ResponseWrapper {
026:
027: private String localName;
028: private String targetNamespace;
029: private String className;
030:
031: /** A ResponseWrapperAnnot cannot be instantiated. */
032: private ResponseWrapperAnnot() {
033:
034: }
035:
036: private ResponseWrapperAnnot(String localName,
037: String targetNamespace, String className) {
038: this .localName = localName;
039: this .targetNamespace = targetNamespace;
040: this .className = className;
041: }
042:
043: public static ResponseWrapperAnnot createResponseWrapperAnnotImpl() {
044: return new ResponseWrapperAnnot();
045: }
046:
047: public static ResponseWrapperAnnot createResponseWrapperAnnotImpl(
048: String localName, String targetNamespace, String className) {
049: return new ResponseWrapperAnnot(localName, targetNamespace,
050: className);
051: }
052:
053: /** @return Returns the name. */
054: public String localName() {
055: return this .localName;
056: }
057:
058: /** @return Returns the targetNamespace. */
059: public String targetNamespace() {
060: return this .targetNamespace;
061: }
062:
063: /** @return Returns the wsdlLocation. */
064: public String className() {
065: return this .className;
066: }
067:
068: /** @param name The name to set. */
069: public void setLocalName(String localName) {
070: this .localName = localName;
071: }
072:
073: /** @param targetNamespace The targetNamespace to set. */
074: public void setTargetNamespace(String targetNamespace) {
075: this .targetNamespace = targetNamespace;
076: }
077:
078: /** @param wsdlLocation The wsdlLocation to set. */
079: public void setClassName(String className) {
080: this .className = className;
081: }
082:
083: //hmm, should we really do this
084: public Class<Annotation> annotationType() {
085: return Annotation.class;
086: }
087:
088: /**
089: * Convenience method for unit testing. We will print all of the
090: * data members here.
091: */
092: public String toString() {
093: StringBuffer sb = new StringBuffer();
094: String newLine = "\n";
095: sb.append(newLine);
096: sb.append("@ResponseWrapper.localName= " + localName);
097: sb.append(newLine);
098: sb.append("@ResponseWrapper.className= " + className);
099: sb.append(newLine);
100: sb.append("@ResponseWrapper.targetNamespace= "
101: + targetNamespace);
102: sb.append(newLine);
103: return sb.toString();
104: }
105:
106: }
|