1 17 18 package javax.servlet.jsp.tagext; 19 20 28 29 public class TagAttributeInfo { 30 34 35 public static final String ID = "id"; 36 37 51 52 public TagAttributeInfo(String name, boolean required, String type, 53 boolean reqTime) { 54 this.name = name; 55 this.required = required; 56 this.type = type; 57 this.reqTime = reqTime; 58 } 59 60 78 79 public TagAttributeInfo(String name, boolean required, String type, 80 boolean reqTime, boolean fragment) { 81 this(name, required, type, reqTime); 82 this.fragment = fragment; 83 } 84 85 88 public TagAttributeInfo(String name, boolean required, String type, 89 boolean reqTime, boolean fragment, String description, 90 boolean deferredValue, boolean deferredMethod, 91 String expectedTypeName, String methodSignature) { 92 this(name, required, type, reqTime, fragment); 93 this.description = description; 94 this.deferredValue = deferredValue; 95 this.deferredMethod = deferredMethod; 96 this.expectedTypeName = expectedTypeName; 97 this.methodSignature = methodSignature; 98 } 99 100 105 106 public String getName() { 107 return name; 108 } 109 110 115 116 public String getTypeName() { 117 return type; 118 } 119 120 125 126 public boolean canBeRequestTime() { 127 return reqTime; 128 } 129 130 135 public boolean isRequired() { 136 return required; 137 } 138 139 147 public static TagAttributeInfo getIdAttribute(TagAttributeInfo a[]) { 148 for (int i = 0; i < a.length; i++) { 149 if (a[i].getName().equals(ID)) { 150 return a[i]; 151 } 152 } 153 return null; } 155 156 163 public boolean isFragment() { 164 return fragment; 165 } 166 167 173 public String toString() { 174 StringBuffer b = new StringBuffer (64); 175 b.append("name = " + name + " "); 176 b.append("type = " + type + " "); 177 b.append("reqTime = " + reqTime + " "); 178 b.append("required = " + required + " "); 179 b.append("fragment = " + fragment + " "); 180 b.append("deferredValue = " + deferredValue + " "); 181 b.append("expectedTypeName = " + expectedTypeName + " "); 182 b.append("deferredMethod = " + deferredMethod + " "); 183 b.append("methodSignature = " + methodSignature); 184 return b.toString(); 185 } 186 187 190 private String name; 191 192 private String type; 193 194 private boolean reqTime; 195 196 private boolean required; 197 198 201 private boolean fragment; 202 203 206 private String description; 207 208 private boolean deferredValue; 209 210 private boolean deferredMethod; 211 212 private String expectedTypeName; 213 214 private String methodSignature; 215 216 public boolean isDeferredMethod() { 217 return deferredMethod; 218 } 219 220 public boolean isDeferredValue() { 221 return deferredValue; 222 } 223 224 public String getDescription() { 225 return description; 226 } 227 228 public String getExpectedTypeName() { 229 return expectedTypeName; 230 } 231 232 public String getMethodSignature() { 233 return methodSignature; 234 } 235 } 236 | Popular Tags |