Represents attributes that can be request time expressions. Can either be a plain attribute, an attribute that represents a request time expression value, or a named attribute (specified using the jsp:attribute standard action).
| 2476 | */ |
| 2477 | |
| 2478 | public static class JspAttribute { |
| 2479 | |
| 2480 | private final String qName; |
| 2481 | |
| 2482 | private final String uri; |
| 2483 | |
| 2484 | private final String localName; |
| 2485 | |
| 2486 | private final String value; |
| 2487 | |
| 2488 | private final boolean expression; |
| 2489 | |
| 2490 | private final boolean dynamic; |
| 2491 | |
| 2492 | private final ELNode.Nodes el; |
| 2493 | |
| 2494 | private final TagAttributeInfo tai; |
| 2495 | |
| 2496 | // If true, this JspAttribute represents a <jsp:attribute> |
| 2497 | private final boolean namedAttribute; |
| 2498 | |
| 2499 | // The node in the parse tree for the NamedAttribute |
| 2500 | private final NamedAttribute namedAttributeNode; |
| 2501 | |
| 2502 | JspAttribute(TagAttributeInfo tai, String qName, String uri, String localName, String value, boolean expr, |
| 2503 | ELNode.Nodes el, boolean dyn) { |
| 2504 | this.qName = qName; |
| 2505 | this.uri = uri; |
| 2506 | this.localName = localName; |
| 2507 | this.value = value; |
| 2508 | this.namedAttributeNode = null; |
| 2509 | this.expression = expr; |
| 2510 | this.el = el; |
| 2511 | this.dynamic = dyn; |
| 2512 | this.namedAttribute = false; |
| 2513 | this.tai = tai; |
| 2514 | } |
| 2515 | |
| 2516 | /** |
| 2517 | * Allow node to validate itself. |
| 2518 | * |
| 2519 | * @param ef The expression factory to use to evaluate any EL |
| 2520 | * @param ctx The context to use to evaluate any EL |
| 2521 | * |
| 2522 | * @throws ELException If validation fails |
| 2523 | */ |
| 2524 | public void validateEL(ExpressionFactory ef, ELContext ctx) throws ELException { |
| 2525 | if (this.el != null) { |
| 2526 | // determine exact type |
| 2527 | ef.createValueExpression(ctx, this.value, String.class); |
| 2528 | } |
| 2529 | } |
| 2530 | |
| 2531 | /** |
| 2532 | * Use this constructor if the JspAttribute represents a named attribute. In this case, we have to store the |
| 2533 | * nodes of the body of the attribute. |
| 2534 | */ |
| 2535 | JspAttribute(NamedAttribute na, TagAttributeInfo tai, boolean dyn) { |
nothing calls this directly
no outgoing calls
no test coverage detected