AntPathPattern

class AntPathPattern(val text: String)

AntPattern implementation for Ant-style path patterns. Examples are provided below.

Part of this mapping code has been kindly borrowed from Apache Ant.

The mapping matches URLs using the following rules:

  • ? matches one character

    • matches zero or more characters
  • ** matches zero or more 'directories' in a path

Some examples:

  • com/t?st.jsp - matches com/test.jsp but also com/tast.jsp or com/txst.jsp

  • com/*sp - matches all .jsp files in the com directory

  • org/beangle/**/*.jsp - matches all .jsp files underneath

  • com/**/test.jsp - matches all test.jsp files underneath the com path the org/beangle path

  • org/**/servlet/bla.jsp - matches org/beangle/servlet/bla.jsp but also org/beangle/testing/servlet/bla.jsp and org/servlet/bla.jsp

Since

3.1.0

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

override
def equals(obj: Any): Boolean
Definition Classes
Any
override
def hashCode(): Int
Definition Classes
Any
def matchStart(path: String): Boolean
def matches(path: String): Boolean
override
def toString(): String
Definition Classes
Any

Concrete fields

val pattern: Pattern
val text: String