Package org.apache.catalina.valves.rewrite

## Class Substitution

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

    public class Substitution
    extends java.lang.Object

### Nested Class Summary

Nested Classes
`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
`protected Substitution.SubstitutionElement[]` `elements`
`protected java.lang.String` `sub`

### Constructor Summary

Constructors
`Substitution()`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `evaluate​(java.util.regex.Matcher rule, java.util.regex.Matcher cond, Resolver resolver)` Evaluate the substitution based on the context.
`java.lang.String` `getSub()`
`void` `parse​(java.util.Map<java.lang.String,​RewriteMap> maps)`
`void` `setSub​(java.lang.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 java.lang.String sub

### Constructor Detail

#### Substitution

    public Substitution()

### Method Detail

#### getSub

    public java.lang.String getSub()

#### setSub

    public void setSub​(java.lang.String sub)

#### parse

    public void parse​(java.util.Map<java.lang.String,​RewriteMap> maps)

#### evaluate

    public java.lang.String evaluate​(java.util.regex.Matcher rule,
                                     java.util.regex.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