Package org.eclipse.jetty.webapp
Class ClasspathPattern
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<String>
-
- org.eclipse.jetty.webapp.ClasspathPattern
-
@Deprecated(since="2021-05-27") public class ClasspathPattern extends AbstractSet<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(String pattern)
Deprecated.ClasspathPattern(String[] patterns)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
add(String pattern)
Deprecated.boolean
add(String... pattern)
Deprecated.void
clear()
Deprecated.boolean
exclude(String name)
Deprecated.boolean
exclude(String... name)
Deprecated.String[]
getPatterns()
Deprecated.boolean
include(String name)
Deprecated.boolean
include(String... name)
Deprecated.Iterator<String>
iterator()
Deprecated.boolean
match(Class<?> clazz)
Deprecated.Match the class name against the patternboolean
match(String name)
Deprecated.Match the class name against the patternboolean
match(String name, URL url)
Deprecated.boolean
remove(Object o)
Deprecated.int
size()
Deprecated.-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, retainAll, toArray, toArray, toString
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
addAll, contains, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
include
public boolean include(String name)
Deprecated.
-
include
public boolean include(String... name)
Deprecated.
-
exclude
public boolean exclude(String name)
Deprecated.
-
exclude
public boolean exclude(String... name)
Deprecated.
-
add
public boolean add(String pattern)
Deprecated.- Specified by:
add
in interfaceCollection<String>
- Specified by:
add
in interfaceSet<String>
- Overrides:
add
in classAbstractCollection<String>
-
add
public boolean add(String... pattern)
Deprecated.
-
remove
public boolean remove(Object o)
Deprecated.- Specified by:
remove
in interfaceCollection<String>
- Specified by:
remove
in interfaceSet<String>
- Overrides:
remove
in classAbstractCollection<String>
-
clear
public void clear()
Deprecated.- Specified by:
clear
in interfaceCollection<String>
- Specified by:
clear
in interfaceSet<String>
- Overrides:
clear
in classAbstractCollection<String>
-
size
public int size()
Deprecated.- Specified by:
size
in interfaceCollection<String>
- Specified by:
size
in interfaceSet<String>
- Specified by:
size
in classAbstractCollection<String>
-
getPatterns
public String[] getPatterns()
Deprecated.- Returns:
- array of classpath patterns
-
match
public boolean match(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(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
-
-