Package net.bytebuddy.matcher
Class ClassLoaderParentMatcher<T extends java.lang.ClassLoader>
- java.lang.Object
-
- net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<T>
-
- net.bytebuddy.matcher.ClassLoaderParentMatcher<T>
-
- Type Parameters:
T- The exact type of the class loader that is matched.
- All Implemented Interfaces:
ElementMatcher<T>,ElementMatcher.Junction<T>
@Enhance public class ClassLoaderParentMatcher<T extends java.lang.ClassLoader> extends ElementMatcher.Junction.AbstractBase<T>
An element matcher that matches a class loader for being a parent of the given class loader.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher.Junction
ElementMatcher.Junction.AbstractBase<V>, ElementMatcher.Junction.Conjunction<W>, ElementMatcher.Junction.Disjunction<W>, ElementMatcher.Junction.ForNonNullValues<W>
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ClassLoaderclassLoaderThe class loader that is matched for being a child of the matched class loader.
-
Constructor Summary
Constructors Constructor Description ClassLoaderParentMatcher(java.lang.ClassLoader classLoader)Creates a class loader parent element matcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(T target)Matches a target against this element matcher.java.lang.StringtoString()-
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase
and, or
-
-
-
-
Field Detail
-
classLoader
@MaybeNull @ValueHandling(REVERSE_NULLABILITY) private final java.lang.ClassLoader classLoader
The class loader that is matched for being a child of the matched class loader.
-
-
Constructor Detail
-
ClassLoaderParentMatcher
public ClassLoaderParentMatcher(@MaybeNull java.lang.ClassLoader classLoader)
Creates a class loader parent element matcher.- Parameters:
classLoader- The class loader that is matched for being a child of the matched class loader.
-
-
Method Detail
-
matches
public boolean matches(@MaybeNull T target)
Matches a target against this element matcher.- Parameters:
target- The instance to be matched ornull.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-