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