01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.apache.cxf.tools.common.model;
19:
20: public class JavaParameter extends JavaType implements JavaAnnotatable {
21:
22: private boolean holder;
23: private String holderName;
24: private JavaAnnotation annotation;
25: private String partName;
26:
27: private JavaMethod javaMethod;
28:
29: public JavaParameter() {
30: }
31:
32: public JavaParameter(String n, String t, String tns) {
33: super (n, t, tns);
34: }
35:
36: public boolean isHolder() {
37: return holder;
38: }
39:
40: public void setHolder(boolean b) {
41: holder = b;
42: }
43:
44: public String getHolderName() {
45: return holderName;
46: }
47:
48: public void setHolderName(String hn) {
49: this .holderName = hn;
50: }
51:
52: public void setAnnotation(JavaAnnotation anno) {
53: this .annotation = anno;
54: }
55:
56: public JavaAnnotation getAnnotation() {
57: return this .annotation;
58: }
59:
60: public void setPartName(String name) {
61: this .partName = name;
62: }
63:
64: public String getPartName() {
65: return this .partName;
66: }
67:
68: public String toString() {
69: final StringBuffer sb = new StringBuffer();
70: sb.append(super .toString());
71: if (holder) {
72: sb.append("\nIS Holder: [Holder Name]:");
73: sb.append(holderName);
74: }
75: if (isHeader()) {
76: sb.append("\nIS Header");
77: }
78: sb.append("\n Annotation:");
79: sb.append(annotation);
80:
81: sb.append("\n PartName");
82: sb.append(partName);
83: return sb.toString();
84: }
85:
86: public void setMethod(JavaMethod jm) {
87: this .javaMethod = jm;
88: }
89:
90: public JavaMethod getMethod() {
91: return this .javaMethod;
92: }
93:
94: public void annotate(Annotator annotator) {
95: annotator.annotate(this);
96: }
97: }
|