01: package org.objectweb.celtix.tools.common.model;
02:
03: import com.sun.xml.bind.api.TypeReference;
04:
05: public class JavaParameter extends JavaType {
06:
07: private boolean holder;
08: private String holderName;
09: private String holderClass;
10: private JavaAnnotation annotation;
11: private String partName;
12:
13: public JavaParameter() {
14: }
15:
16: public JavaParameter(String pname, TypeReference pref,
17: JavaType.Style pstyle) {
18: name = pname;
19: typeRef = pref;
20: style = pstyle;
21: }
22:
23: public JavaParameter(String n, String t, String tns) {
24: super (n, t, tns);
25: }
26:
27: public boolean isHolder() {
28: return holder;
29: }
30:
31: public void setHolder(boolean b) {
32: holder = b;
33: }
34:
35: public String getHolderName() {
36: return holderName;
37: }
38:
39: public void setHolderName(String hn) {
40: this .holderName = hn;
41: }
42:
43: public void setHolderClass(String clz) {
44: this .holderClass = clz;
45: }
46:
47: public String getHolderClass() {
48: return this .holderClass;
49: }
50:
51: public void setAnnotation(JavaAnnotation anno) {
52: this .annotation = anno;
53: }
54:
55: public JavaAnnotation getAnnotation() {
56: return this .annotation;
57: }
58:
59: public void setPartName(String name) {
60: this .partName = name;
61: }
62:
63: public String getPartName() {
64: return this .partName;
65: }
66:
67: public String toString() {
68: final StringBuffer sb = new StringBuffer();
69: sb.append(super .toString());
70: if (holder) {
71: sb.append("\nIS Holder: [Holder Name]:");
72: sb.append(holderName);
73: }
74: if (isHeader()) {
75: sb.append("\nIS Header");
76: }
77: sb.append("\n Annotation:");
78: sb.append(annotation);
79:
80: sb.append("\n PartName");
81: sb.append(partName);
82: return sb.toString();
83: }
84: }
|