class URLPattern
extends java.lang.Object
The representation of a URLPattern in the WebResourcePermission and WebUserDataPermission
URLPatternSpecs.
WebResourcePermission,
WebUserDataPermission| Modifier and Type | Class and Description |
|---|---|
private static class |
URLPattern.PatternType |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
ext |
private int |
length |
private java.lang.String |
pattern |
private URLPattern.PatternType |
type |
| Constructor and Description |
|---|
URLPattern(java.lang.String pattern)
Creates a
URLPattern instance from the specified pattern String. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
(package private) java.lang.String |
getPattern()
Obtains the
String representation of this pattern. |
int |
hashCode() |
(package private) boolean |
isDefault()
Checks if this pattern is a default (i.e.
|
(package private) boolean |
isExact()
Checks if this pattern is an exact pattern.
|
(package private) boolean |
isExtension()
Checks if this pattern is an extension (i.e.
|
(package private) boolean |
isPrefix()
Checks if this pattern is a prefix (i.e.
|
(package private) boolean |
matches(java.lang.String urlPattern)
Checks if this pattern matches the specified pattern String.
|
(package private) boolean |
matches(URLPattern url)
Checks if this pattern matches the specified
URLPattern. |
private java.lang.String pattern
private java.lang.String ext
private int length
private URLPattern.PatternType type
URLPattern(java.lang.String pattern)
Creates a URLPattern instance from the specified pattern String.
pattern - the pattern String.boolean matches(URLPattern url)
Checks if this pattern matches the specified URLPattern.
The matching rules from the WebResourcePermission#implies:
String equivalent, orurl - the URLPattern instance to which this pattern is to be matched.true if this pattern matches the specified URLPattern; false otherwise.boolean matches(java.lang.String urlPattern)
Checks if this pattern matches the specified pattern String.
The matching rules from the WebResourcePermission#implies:
String equivalent, orurlPattern - a String representing the pattern to which this pattern is to be matched.true if this pattern matches the specified URLPattern; false otherwise.java.lang.String getPattern()
Obtains the String representation of this pattern.
String representation.boolean isDefault()
Checks if this pattern is a default (i.e. '/') pattern.
true if this is a default pattern; false otherwise.boolean isExact()
Checks if this pattern is an exact pattern.
true if this is an exact pattern; false otherwise.boolean isExtension()
Checks if this pattern is an extension (i.e. '*.xxx') pattern.
true if this is an extension pattern; false otherwise.boolean isPrefix()
Checks if this pattern is a prefix (i.e. '/*' or '/.../*') pattern.
true if this is a prefix pattern; false otherwise.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object