Package org.apache.catalina.valves.rewrite

## Class Substitution

- java.lang.Object
- - org.apache.catalina.valves.rewrite.Substitution

-     public class Substitution
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `Substitution.MapElement` |
    `static class` | `Substitution.RewriteCondBackReferenceElement` |
    `class` | `Substitution.RewriteRuleBackReferenceElement` |
    `static class` | `Substitution.ServerVariableElement` |
    `static class` | `Substitution.ServerVariableEnvElement` |
    `static class` | `Substitution.ServerVariableHttpElement` |
    `static class` | `Substitution.ServerVariableSslElement` |
    `static class` | `Substitution.StaticElement` |
    `static class` | `Substitution.SubstitutionElement` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected Substitution.SubstitutionElement[]` | `elements` |
    `protected String` | `sub` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Substitution()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `evaluate​(Matcher rule, Matcher cond, Resolver resolver)` | Evaluate the substitution based on the context.
    `String` | `getSub()` |
    `void` | `parse​(Map<String,​RewriteMap> maps)` |
    `void` | `setSub​(String sub)` |

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

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

- - ### Field Detail

    - #### elements

          protected Substitution.SubstitutionElement[] elements

    - #### sub

          protected String sub

  - ### Constructor Detail

    - #### Substitution

          public Substitution()

  - ### Method Detail

    - #### getSub

          public String getSub()

    - #### setSub

          public void setSub​(String sub)

    - #### parse

          public void parse​(Map<String,​RewriteMap> maps)

    - #### evaluate

          public String evaluate​(Matcher rule,
                                 Matcher cond,
                                 Resolver resolver)

      Evaluate the substitution based on the context.
      Parameters:
        `rule` - corresponding matched rule
        `cond` - last matched condition
        `resolver` - The property resolver
      Returns:
        The substitution result