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

# Class Substitution.RewriteCondBackReferenceElement

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

Enclosing class:
  `Substitution`

public static class Substitution.RewriteCondBackReferenceElement extends Substitution.SubstitutionElement
Substitution element that produces a back-reference to a rewrite condition group.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `n`
  The group number to reference.

- ## Constructor Summary

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

- ## 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

  - ### n

    public int n
    The group number to reference.

- ## Constructor Details

  - ### RewriteCondBackReferenceElement

    public RewriteCondBackReferenceElement()
    Constructs a new RewriteCondBackReferenceElement.

- ## 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