1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.apt.generate;
21
22 import java.util.ArrayList;
23 import java.util.List;
24
25
26 public class TagInfo extends RendererInfo {
27 private List<PropertyInfo> properties = new ArrayList<PropertyInfo>();
28 private String componentClassName;
29 private String componentType;
30 private String componentFamily;
31 private PropertyInfo bodyContent;
32 private boolean checkBodyContent;
33
34 public TagInfo(String sourceClass, String qualifiedName, String rendererType) {
35 super(sourceClass, qualifiedName, rendererType);
36 }
37
38 public TagInfo(String sourceClass, String qualifiedName) {
39 super(sourceClass, qualifiedName);
40 }
41
42 public PropertyInfo getBodyContent() {
43 if (!checkBodyContent) {
44 checkBodyContent = true;
45 for (PropertyInfo info : properties) {
46 if (info.isBodyContent()) {
47 bodyContent = info;
48 break;
49 }
50 }
51 }
52 return bodyContent;
53 }
54
55 public void setBodyContent(PropertyInfo bodyContent) {
56 this.bodyContent = bodyContent;
57 }
58
59 public List<PropertyInfo> getProperties() {
60 return properties;
61 }
62
63 public int getPropertiesSize() {
64 return properties.size();
65 }
66
67 public int getPropertiesSizePlusOne() {
68 return properties.size() + 1;
69 }
70
71 public void setComponentClassName(String componentClass) {
72 addImport(componentClass);
73 this.componentClassName = ClassUtils.getSimpleName(componentClass);
74 }
75
76 public String getComponentClassName() {
77 return componentClassName;
78 }
79
80 public String getComponentType() {
81 return componentType;
82 }
83
84 public void setComponentType(String componentType) {
85 this.componentType = componentType;
86 }
87
88 public String getComponentFamily() {
89 return componentFamily;
90 }
91
92 public void setComponentFamily(String componentFamily) {
93 this.componentFamily = componentFamily;
94 }
95 }