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 RequestWrapperAnnot implements javax.xml.ws.RequestWrapper {
025:
026: private String localName;
027: private String targetNamespace;
028: private String className;
029:
030: /** A RequestWrapperAnnot cannot be instantiated. */
031: private RequestWrapperAnnot() {
032:
033: }
034:
035: private RequestWrapperAnnot(String localName,
036: String targetNamespace, String className) {
037: this .localName = localName;
038: this .targetNamespace = targetNamespace;
039: this .className = className;
040: }
041:
042: public static RequestWrapperAnnot createRequestWrapperAnnotImpl() {
043: return new RequestWrapperAnnot();
044: }
045:
046: public static RequestWrapperAnnot createRequestWrapperAnnotImpl(
047: String localName, String targetNamespace, String className) {
048: return new RequestWrapperAnnot(localName, targetNamespace,
049: className);
050: }
051:
052: /** @return Returns the name. */
053: public String localName() {
054: return this .localName;
055: }
056:
057: /** @return Returns the targetNamespace. */
058: public String targetNamespace() {
059: return this .targetNamespace;
060: }
061:
062: /** @return Returns the wsdlLocation. */
063: public String className() {
064: return this .className;
065: }
066:
067: /** @param name The name to set. */
068: public void setLocalName(String localName) {
069: this .localName = localName;
070: }
071:
072: /** @param targetNamespace The targetNamespace to set. */
073: public void setTargetNamespace(String targetNamespace) {
074: this .targetNamespace = targetNamespace;
075: }
076:
077: /** @param wsdlLocation The wsdlLocation to set. */
078: public void setClassName(String className) {
079: this .className = className;
080: }
081:
082: //hmm, should we really do this
083: public Class<Annotation> annotationType() {
084: return Annotation.class;
085: }
086:
087: /**
088: * Convenience method for unit testing. We will print all of the
089: * data members here.
090: */
091: public String toString() {
092: StringBuffer sb = new StringBuffer();
093: String newLine = "\n";
094: sb.append(newLine);
095: sb.append("@RequestWrapper.localName= " + localName);
096: sb.append(newLine);
097: sb.append("@RequestWrapper.className= " + className);
098: sb.append(newLine);
099: sb
100: .append("@RequestWrapper.targetNamespace= "
101: + targetNamespace);
102: sb.append(newLine);
103: return sb.toString();
104: }
105:
106: }
|