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 and Description
    --- | ---
    `class` | `Substitution.MapElement`
    `class` | `Substitution.RewriteCondBackReferenceElement`
    `class` | `Substitution.RewriteRuleBackReferenceElement`
    `class` | `Substitution.ServerVariableElement`
    `class` | `Substitution.ServerVariableEnvElement`
    `class` | `Substitution.ServerVariableHttpElement`
    `class` | `Substitution.ServerVariableSslElement`
    `class` | `Substitution.StaticElement`
    `class` | `Substitution.SubstitutionElement`

  - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Substitution()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.