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 classClasspathPattern.ByClassDeprecated.static classClasspathPattern.ByLocationDeprecated.static classClasspathPattern.ByLocationOrModuleDeprecated.static classClasspathPattern.ByModuleDeprecated.static classClasspathPattern.ByPackageDeprecated.static classClasspathPattern.ByPackageOrNameDeprecated.
-
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 booleanadd(String pattern)Deprecated.booleanadd(String... pattern)Deprecated.voidclear()Deprecated.booleanexclude(String name)Deprecated.booleanexclude(String... name)Deprecated.String[]getPatterns()Deprecated.booleaninclude(String name)Deprecated.booleaninclude(String... name)Deprecated.Iterator<String>iterator()Deprecated.booleanmatch(Class<?> clazz)Deprecated.Match the class name against the patternbooleanmatch(String name)Deprecated.Match the class name against the patternbooleanmatch(String name, URL url)Deprecated.booleanremove(Object o)Deprecated.intsize()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:
addin interfaceCollection<String>- Specified by:
addin interfaceSet<String>- Overrides:
addin classAbstractCollection<String>
-
add
public boolean add(String... pattern)
Deprecated.
-
remove
public boolean remove(Object o)
Deprecated.- Specified by:
removein interfaceCollection<String>- Specified by:
removein interfaceSet<String>- Overrides:
removein classAbstractCollection<String>
-
clear
public void clear()
Deprecated.- Specified by:
clearin interfaceCollection<String>- Specified by:
clearin interfaceSet<String>- Overrides:
clearin classAbstractCollection<String>
-
size
public int size()
Deprecated.- Specified by:
sizein interfaceCollection<String>- Specified by:
sizein interfaceSet<String>- Specified by:
sizein 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
-
-