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: /**
021: *
022: */package org.apache.axis2.jaxws.description.builder;
023:
024: public class FieldDescriptionComposite implements
025: TMFAnnotationComposite {
026:
027: //Method reflective information
028: private String fieldName; //field name
029: private String modifierType; //field modifier
030:
031: // indicates whether the field was annotated with @XmlList or not
032: private boolean isListType = false;
033:
034: private HandlerChainAnnot handlerChainAnnot;
035: private WebServiceRefAnnot webServiceRefAnnot;
036:
037: /*
038: * Default Constructor
039: */
040: public FieldDescriptionComposite() {
041:
042: }
043:
044: public FieldDescriptionComposite(String fieldName,
045: String modifierType, HandlerChainAnnot handlerChainAnnot,
046: WebServiceRefAnnot webServiceRefAnnot) {
047: this .fieldName = fieldName;
048: this .modifierType = modifierType;
049: this .handlerChainAnnot = handlerChainAnnot;
050: this .webServiceRefAnnot = webServiceRefAnnot;
051: }
052:
053: /** @return Returns the fieldName. */
054: public String getFieldName() {
055: return fieldName;
056: }
057:
058: /** @return Returns the handlerChainAnnot. */
059: public HandlerChainAnnot getHandlerChainAnnot() {
060: return handlerChainAnnot;
061: }
062:
063: /** @return Returns the modifierType. */
064: public String getModifierType() {
065: return modifierType;
066: }
067:
068: /** @return Returns the webServiceRefAnnot. */
069: public WebServiceRefAnnot getWebServiceRefAnnot() {
070: return webServiceRefAnnot;
071: }
072:
073: /** @param fieldName The fieldName to set. */
074: public void setFieldName(String fieldName) {
075: this .fieldName = fieldName;
076: }
077:
078: /** @param handlerChainAnnot The handlerChainAnnot to set. */
079: public void setHandlerChainAnnot(HandlerChainAnnot handlerChainAnnot) {
080: this .handlerChainAnnot = handlerChainAnnot;
081: }
082:
083: /** @param modifierType The modifierType to set. */
084: public void setModifierType(String modifierType) {
085: this .modifierType = modifierType;
086: }
087:
088: /** @param webServiceRefAnnot The webServiceRefAnnot to set. */
089: public void setWebServiceRefAnnot(
090: WebServiceRefAnnot webServiceRefAnnot) {
091: this .webServiceRefAnnot = webServiceRefAnnot;
092: }
093:
094: public void setIsListType(boolean isListType) {
095: this .isListType = isListType;
096: }
097:
098: public boolean isListType() {
099: return isListType;
100: }
101:
102: /**
103: * Convenience method for unit testing. We will print all of the
104: * data members here.
105: */
106: public String toString() {
107: StringBuffer sb = new StringBuffer();
108: String newLine = "\n";
109: sb.append("***** BEGIN FieldDescriptionComposite *****");
110: sb.append("FDC.fieldName=" + fieldName);
111: sb.append(newLine);
112: if (handlerChainAnnot != null) {
113: sb.append("\t @HandlerChain");
114: sb.append(newLine);
115: sb.append("\t" + handlerChainAnnot.toString());
116: }
117: sb.append(newLine);
118: if (webServiceRefAnnot != null) {
119: sb.append("\t @WebServiceRef");
120: sb.append(newLine);
121: sb.append("\t" + webServiceRefAnnot.toString());
122: }
123: sb.append("***** END FieldDescriptionComposite");
124: return sb.toString();
125: }
126: }
|