Substitution.StaticElement (Apache Tomcat 9.0.119 API Documentation)
Description: declaration: package: org.apache.catalina.valves.rewrite, class: Substitution, class: StaticElement

# Class Substitution.StaticElement

java.lang.Object
org.apache.catalina.valves.rewrite.Substitution.SubstitutionElement
org.apache.catalina.valves.rewrite.Substitution.StaticElement

Enclosing class:
  `Substitution`

public static class Substitution.StaticElement extends Substitution.SubstitutionElement
Substitution element that produces a static string value.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `String`
  `value`
  The static string value.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StaticElement()`
  Constructs a new StaticElement.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `evaluate(Matcher rule, Matcher cond, Resolver resolver)`
  Evaluates this element against the given matchers and resolver.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### value

    public String value
    The static string value.

- ## Constructor Details

  - ### StaticElement

    public StaticElement()
    Constructs a new StaticElement.

- ## Method Details

  - ### evaluate

    public String evaluate(Matcher rule, Matcher cond, Resolver resolver)
    Description copied from class: `Substitution.SubstitutionElement`
    Evaluates this element against the given matchers and resolver.
    Specified by:
      `evaluate` in class `Substitution.SubstitutionElement`
    Parameters:
      `rule` - the rewrite rule matcher
      `cond` - the condition matcher
      `resolver` - the property resolver
    Returns:
      the evaluated string