Package org.eclipse.jetty.webapp
Class ClasspathPattern
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<java.lang.String>
-
- org.eclipse.jetty.webapp.ClasspathPattern
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.String>
,java.util.Collection<java.lang.String>
,java.util.Set<java.lang.String>
@Deprecated(since="2021-05-27") public class ClasspathPattern extends java.util.AbstractSet<java.lang.String>
Deprecated.Classpath classes list performs pattern matching of a class name against an internal array of classpath pattern entries. A class pattern is a string of one of the forms:- 'org.package.SomeClass' will match a specific class
- 'org.package.' will match a specific package hierarchy
- 'org.package.SomeClass$NestedClass ' will match a nested class exactly otherwise. Nested classes are matched by their containing class. (eg. org.example.MyClass matches org.example.MyClass$AnyNestedClass)
- 'file:///some/location/' - A file system directory from which the class was loaded
- 'file:///some/location.jar' - The URI of a jar file from which the class was loaded
- 'jrt:/modulename' - A Java9 module name
- Any of the above patterns preceded by '-' will exclude rather than include the match.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClasspathPattern.ByClass
Deprecated.static class
ClasspathPattern.ByLocation
Deprecated.static class
ClasspathPattern.ByLocationOrModule
Deprecated.static class
ClasspathPattern.ByModule
Deprecated.static class
ClasspathPattern.ByPackage
Deprecated.static class
ClasspathPattern.ByPackageOrName
Deprecated.
-
Constructor Summary
Constructors Constructor Description ClasspathPattern()
Deprecated.ClasspathPattern(java.lang.String pattern)
Deprecated.ClasspathPattern(java.lang.String[] patterns)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
add(java.lang.String pattern)
Deprecated.boolean
add(java.lang.String... pattern)
Deprecated.void
clear()
Deprecated.boolean
exclude(java.lang.String name)
Deprecated.boolean
exclude(java.lang.String... name)
Deprecated.java.lang.String[]
getPatterns()
Deprecated.boolean
include(java.lang.String name)
Deprecated.boolean
include(java.lang.String... name)
Deprecated.java.util.Iterator<java.lang.String>
iterator()
Deprecated.boolean
match(java.lang.Class<?> clazz)
Deprecated.Match the class name against the patternboolean
match(java.lang.String name)
Deprecated.Match the class name against the patternboolean
match(java.lang.String name, java.net.URL url)
Deprecated.boolean
remove(java.lang.Object o)
Deprecated.int
size()
Deprecated.
-
-
-
Method Detail
-
include
public boolean include(java.lang.String name)
Deprecated.
-
include
public boolean include(java.lang.String... name)
Deprecated.
-
exclude
public boolean exclude(java.lang.String name)
Deprecated.
-
exclude
public boolean exclude(java.lang.String... name)
Deprecated.
-
add
public boolean add(java.lang.String pattern)
Deprecated.- Specified by:
add
in interfacejava.util.Collection<java.lang.String>
- Specified by:
add
in interfacejava.util.Set<java.lang.String>
- Overrides:
add
in classjava.util.AbstractCollection<java.lang.String>
-
add
public boolean add(java.lang.String... pattern)
Deprecated.
-
remove
public boolean remove(java.lang.Object o)
Deprecated.- Specified by:
remove
in interfacejava.util.Collection<java.lang.String>
- Specified by:
remove
in interfacejava.util.Set<java.lang.String>
- Overrides:
remove
in classjava.util.AbstractCollection<java.lang.String>
-
clear
public void clear()
Deprecated.- Specified by:
clear
in interfacejava.util.Collection<java.lang.String>
- Specified by:
clear
in interfacejava.util.Set<java.lang.String>
- Overrides:
clear
in classjava.util.AbstractCollection<java.lang.String>
-
iterator
public java.util.Iterator<java.lang.String> iterator()
Deprecated.- Specified by:
iterator
in interfacejava.util.Collection<java.lang.String>
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.String>
- Specified by:
iterator
in interfacejava.util.Set<java.lang.String>
- Specified by:
iterator
in classjava.util.AbstractCollection<java.lang.String>
-
size
public int size()
Deprecated.- Specified by:
size
in interfacejava.util.Collection<java.lang.String>
- Specified by:
size
in interfacejava.util.Set<java.lang.String>
- Specified by:
size
in classjava.util.AbstractCollection<java.lang.String>
-
getPatterns
public java.lang.String[] getPatterns()
Deprecated.- Returns:
- array of classpath patterns
-
match
public boolean match(java.lang.String name)
Deprecated.Match the class name against the pattern- Parameters:
name
- name of the class to match- Returns:
- true if class matches the pattern
-
match
public boolean match(java.lang.Class<?> clazz)
Deprecated.Match the class name against the pattern- Parameters:
clazz
- A class to try to match- Returns:
- true if class matches the pattern
-
match
public boolean match(java.lang.String name, java.net.URL url)
Deprecated.
-
-