org.apache.struts2.tiles

## Class StrutsTilesAnnotationProcessor

- java.lang.Object
- - org.apache.struts2.tiles.StrutsTilesAnnotationProcessor

-     public class StrutsTilesAnnotationProcessor
      extends Object

  Processes tiles annotations to create `Definition`s and `Attribute`s in a way as close to `tiles.xml` as possible.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StrutsTilesAnnotationProcessor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Attribute` | `buildAddAttribute(TilesAddAttribute addAttribute)`
    `protected Attribute` | `buildAddListAttribute(TilesAddListAttribute addListAttribute)`
    `protected Attribute` | `buildPutAttribute(TilesPutAttribute putAttribute)`
    `protected Attribute` | `buildPutListAttribute(TilesPutListAttribute putListAttribute)`
    `protected Attribute` | `buildTemplateAttribute(TilesDefinition tilesDef)`
    `Definition` | `buildTilesDefinition(String tileName, TilesDefinition tilesDefinition)` Builds a `Definition` based on given `TilesDefinition` with given name.
    `TilesDefinition` | `findAnnotation(Object action, String tileName)` Search strategy is as follows: Check if action has Annotation `TilesDefinition` If not, check if action has Annotation `TilesDefinitions` If given tileName is not null and present in `TilesDefinitions`, return it Return first element of `TilesDefinitions` Return null
    `protected String` | `getValueOrNull(String value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StrutsTilesAnnotationProcessor

          public StrutsTilesAnnotationProcessor()

  - ### Method Detail

    - #### findAnnotation

          public TilesDefinition findAnnotation(Object action,
                                                String tileName)

      Search strategy is as follows:
      - Check if action has Annotation `TilesDefinition`
      - If not, check if action has Annotation `TilesDefinitions`
      - If given tileName is not null and present in `TilesDefinitions`, return it
      - Return first element of `TilesDefinitions`
      - Return null
      Parameters:
        `action` - Annotated action.
        `tileName` - Tilename to search for. May be null in some circumstances.
      Returns:
        `TilesDefinition`

    - #### buildTilesDefinition

          public Definition buildTilesDefinition(String tileName,
                                                 TilesDefinition tilesDefinition)

      Builds a `Definition` based on given `TilesDefinition` with given name.
      Parameters:
        `tileName` - name for resulting `Definition`.
        `tilesDefinition` - `TilesDefinition` to process.
      Returns:
        `Definition` represented by given `TilesDefinition`.

    - #### buildTemplateAttribute

          protected Attribute buildTemplateAttribute(TilesDefinition tilesDef)

    - #### buildPutAttribute

          protected Attribute buildPutAttribute(TilesPutAttribute putAttribute)

    - #### buildPutListAttribute

          protected Attribute buildPutListAttribute(TilesPutListAttribute putListAttribute)

    - #### buildAddAttribute

          protected Attribute buildAddAttribute(TilesAddAttribute addAttribute)

    - #### buildAddListAttribute

          protected Attribute buildAddListAttribute(TilesAddListAttribute addListAttribute)

    - #### getValueOrNull

          protected String getValueOrNull(String value)

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.