| 1 |
package org.apache.jasper.compiler; |
| 2 |
|
| 3 |
public class JtpAttribute { |
| 4 |
private final Node.AttributeDirective attributeDirective; |
| 5 |
|
| 6 |
public JtpAttribute(Node.AttributeDirective attributeDirective) { |
| 7 |
this.attributeDirective = attributeDirective; |
| 8 |
} |
| 9 |
|
| 10 |
public String getAttribute(String name) { |
| 11 |
return this.attributeDirective.getAttributeValue(name); |
| 12 |
} |
| 13 |
|
| 14 |
public boolean isRequired() { |
| 15 |
return Boolean.parseBoolean(getAttribute("required")); |
| 16 |
} |
| 17 |
|
| 18 |
public String getName() { |
| 19 |
return getAttribute("name"); |
| 20 |
} |
| 21 |
|
| 22 |
public String getType() { |
| 23 |
return getAttribute("type"); |
| 24 |
} |
| 25 |
} |