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 WebServiceRefAnnot implements javax.xml.ws.WebServiceRef {
025:
026: private String name = "";
027: private String wsdlLocation = "";
028: private Class type;
029: private Class value;
030: private String mappedName = "";
031:
032: private String typeString = "";
033: private String valueString = "";
034:
035: /** A WebServiceRefAnnot cannot be instantiated. */
036: private WebServiceRefAnnot() {
037:
038: }
039:
040: private WebServiceRefAnnot(String name, String wsdlLocation,
041: Class type, Class value, String mappedName,
042: String typeString, String valueString) {
043: this .name = name;
044: this .wsdlLocation = wsdlLocation;
045: this .type = type;
046: this .value = value;
047: this .mappedName = mappedName;
048: this .typeString = typeString;
049: this .valueString = valueString;
050: }
051:
052: public static WebServiceRefAnnot createWebServiceRefAnnotImpl() {
053: return new WebServiceRefAnnot();
054: }
055:
056: public static WebServiceRefAnnot createWebServiceRefAnnotImpl(
057: String name, String wsdlLocation, Class type, Class value,
058: String mappedName, String typeString, String valueString) {
059: return new WebServiceRefAnnot(name, wsdlLocation, type, value,
060: mappedName, typeString, valueString);
061: }
062:
063: /** @return Returns the mappedName. */
064: public String mappedName() {
065: return mappedName;
066: }
067:
068: /** @return Returns the name. */
069: public String name() {
070: return name;
071: }
072:
073: /** @return Returns the type. */
074: public Class type() {
075: return type;
076: }
077:
078: /** @return Returns the value. */
079: public Class value() {
080: return value;
081: }
082:
083: /** @return Returns the wsdlLocation. */
084: public String wsdlLocation() {
085: return wsdlLocation;
086: }
087:
088: /** @return Returns the typeString. */
089: public String getTypeString() {
090: return typeString;
091: }
092:
093: /** @return Returns the valueString. */
094: public String getValueString() {
095: return valueString;
096: }
097:
098: /** @param mappedName The mappedName to set. */
099: public void setMappedName(String mappedName) {
100: this .mappedName = mappedName;
101: }
102:
103: /** @param name The name to set. */
104: public void setName(String name) {
105: this .name = name;
106: }
107:
108: /** @param type The type to set. */
109: public void setType(Class type) {
110: this .type = type;
111: }
112:
113: /** @param value The value to set. */
114: public void setValue(Class value) {
115: this .value = value;
116: }
117:
118: /** @param wsdlLocation The wsdlLocation to set. */
119: public void setWsdlLocation(String wsdlLocation) {
120: this .wsdlLocation = wsdlLocation;
121: }
122:
123: /** @return Returns the wsdlLocation. */
124: public String getWsdlLocation() {
125: return wsdlLocation;
126: }
127:
128: /** @param typeString The typeString to set. */
129: public void setTypeString(String typeString) {
130: this .typeString = typeString;
131: }
132:
133: /** @param valueString The valueString to set. */
134: public void setValueString(String valueString) {
135: this .valueString = valueString;
136: }
137:
138: public Class<Annotation> annotationType() {
139: return Annotation.class;
140: }
141:
142: /**
143: * Convenience method for unit testing. We will print all of the
144: * data members here.
145: */
146: public String toString() {
147: StringBuffer sb = new StringBuffer();
148: String newLine = "\n";
149: sb.append(newLine);
150: sb.append("@WebServiceRef.name= " + name);
151: sb.append(newLine);
152: sb.append("@WebServiceRef.wsdlLocation= " + wsdlLocation);
153: sb.append(newLine);
154: sb.append("@WebServiceRef.mappedName= " + mappedName);
155: sb.append(newLine);
156: sb.append("@WebServiceRef.type= " + typeString);
157: sb.append(newLine);
158: sb.append("@WebServiceRef.value= " + valueString);
159: sb.append(newLine);
160: return sb.toString();
161: }
162: }
|