WrapperMappingInfo (Apache Tomcat 11.0.23 API Documentation)
Description: declaration: package: org.apache.catalina.mapper, record: WrapperMappingInfo

# Record Class WrapperMappingInfo

java.lang.Object
java.lang.Record
org.apache.catalina.mapper.WrapperMappingInfo

Record Components:
  `mapping` - The URL pattern
  `wrapper` - The wrapper for the Servlet
  `jspWildCard` - Is this a mapping for JSP files?
  `resourceOnly` - Is this a resource only mapping?

public record WrapperMappingInfo(String mapping, Wrapper wrapper, boolean jspWildCard, boolean resourceOnly) extends Record
Encapsulates information used to register a Wrapper mapping.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WrapperMappingInfo(String mapping, Wrapper wrapper, boolean jspWildCard, boolean resourceOnly)`
  Creates an instance of a `WrapperMappingInfo` record class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `String`
  `getMapping()`
  Returns the URL pattern.
  `Wrapper`
  `getWrapper()`
  Returns the wrapper for the Servlet.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `boolean`
  `isJspWildCard()`
  Returns whether this is a mapping for JSP files.
  `boolean`
  `isResourceOnly()`
  Returns whether this is a resource only mapping.
  `boolean`
  `jspWildCard()`
  Returns the value of the `jspWildCard` record component.
  `String`
  `mapping()`
  Returns the value of the `mapping` record component.
  `boolean`
  `resourceOnly()`
  Returns the value of the `resourceOnly` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.
  `Wrapper`
  `wrapper()`
  Returns the value of the `wrapper` record component.

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### WrapperMappingInfo

    public WrapperMappingInfo(String mapping, Wrapper wrapper, boolean jspWildCard, boolean resourceOnly)
    Creates an instance of a `WrapperMappingInfo` record class.
    Parameters:
      `mapping` - the value for the `mapping` record component
      `wrapper` - the value for the `wrapper` record component
      `jspWildCard` - the value for the `jspWildCard` record component
      `resourceOnly` - the value for the `resourceOnly` record component

- ## Method Details

  - ### getMapping

    public String getMapping()
    Returns the URL pattern.
    Returns:
      the URL pattern

  - ### getWrapper

    public Wrapper getWrapper()
    Returns the wrapper for the Servlet.
    Returns:
      the wrapper

  - ### isJspWildCard

    public boolean isJspWildCard()
    Returns whether this is a mapping for JSP files.
    Returns:
      `true` if this is a JSP wildcard mapping

  - ### isResourceOnly

    public boolean isResourceOnly()
    Returns whether this is a resource only mapping.
    Returns:
      `true` if this is a resource only mapping

  - ### toString

    public final String toString()
    Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
    Specified by:
      `toString` in class `Record`
    Returns:
      a string representation of this object

  - ### hashCode

    public final int hashCode()
    Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
    Specified by:
      `hashCode` in class `Record`
    Returns:
      a hash code value for this object

  - ### equals

    public final boolean equals(Object o)
    Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with `Objects::equals(Object,Object)`; primitive components are compared with the `compare` method from their corresponding wrapper classes.
    Specified by:
      `equals` in class `Record`
    Parameters:
      `o` - the object with which to compare
    Returns:
      `true` if this object is the same as the `o` argument; `false` otherwise.

  - ### mapping

    public String mapping()
    Returns the value of the `mapping` record component.
    Returns:
      the value of the `mapping` record component

  - ### wrapper

    public Wrapper wrapper()
    Returns the value of the `wrapper` record component.
    Returns:
      the value of the `wrapper` record component

  - ### jspWildCard

    public boolean jspWildCard()
    Returns the value of the `jspWildCard` record component.
    Returns:
      the value of the `jspWildCard` record component

  - ### resourceOnly

    public boolean resourceOnly()
    Returns the value of the `resourceOnly` record component.
    Returns:
      the value of the `resourceOnly` record component