Class URLPattern

  • All Implemented Interfaces:
    java.lang.Comparable<URLPattern>
    Direct Known Subclasses:
    URLPatternSpec

    class URLPattern
    extends java.lang.Object
    implements java.lang.Comparable<URLPattern>
    • Field Detail

      • DEFAULT_PATTERN

        private static java.lang.String DEFAULT_PATTERN
      • patternType

        private int patternType
      • pattern

        private final java.lang.String pattern
    • Constructor Detail

      • URLPattern

        public URLPattern()
      • URLPattern

        public URLPattern​(java.lang.String pattern)
    • Method Detail

      • patternType

        public int patternType()
      • compareTo

        public int compareTo​(URLPattern that)
        Specified by:
        compareTo in interface java.lang.Comparable<URLPattern>
      • implies

        public boolean implies​(URLPattern that)
        Does this pattern imply (that is, match) the argument pattern? This method follows the same rules (in the same order) as those used for mapping requests to Jakarta Servlets.

        Two URL patterns match if they are related as follows:

        • their pattern values are String equivalent, or
        • this pattern is the path-prefix pattern "/*", or
        • this pattern is a path-prefix pattern (that is, it starts with "/" and ends with "/*") and the argument pattern starts with the substring of this pattern, minus its last 2 characters, and the next character of the argument pattern, if there is one, is "/", or
        • this pattern is an extension pattern (that is, it starts with "*.") and the argument pattern ends with this pattern, or
        • the reference pattern is the special default pattern, "/", which matches all argument patterns.
        Parameters:
        that - URLPattern to determine if implied by (matched by) this URLPattern to
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getPatternDepth

        public int getPatternDepth()