- java.lang.Object
-
- jakarta.security.jacc.URLPattern
-
- All Implemented Interfaces:
java.lang.Comparable<URLPattern>
- Direct Known Subclasses:
URLPatternSpec
class URLPattern extends java.lang.Object implements java.lang.Comparable<URLPattern>
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
DEFAULT_PATTERN
private java.lang.String
pattern
private int
patternType
static int
PT_DEFAULT
static int
PT_EXACT
static int
PT_EXTENSION
static int
PT_PREFIX
-
Constructor Summary
Constructors Constructor Description URLPattern()
URLPattern(java.lang.String pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(URLPattern that)
boolean
equals(java.lang.Object obj)
int
getPatternDepth()
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.int
patternType()
java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT_PATTERN
private static java.lang.String DEFAULT_PATTERN
-
PT_DEFAULT
public static final int PT_DEFAULT
- See Also:
- Constant Field Values
-
PT_EXTENSION
public static final int PT_EXTENSION
- See Also:
- Constant Field Values
-
PT_PREFIX
public static final int PT_PREFIX
- See Also:
- Constant Field Values
-
PT_EXACT
public static final int PT_EXACT
- See Also:
- Constant Field Values
-
patternType
private int patternType
-
pattern
private final java.lang.String pattern
-
-
Method Detail
-
patternType
public int patternType()
-
compareTo
public int compareTo(URLPattern that)
- Specified by:
compareTo
in interfacejava.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 classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getPatternDepth
public int getPatternDepth()
-
-