Top Description Fields Constructors Methods
net.bytebuddy.matcher

public Class ClassLoaderHierarchyMatcher<T extends java.lang.ClassLoader>

extends ElementMatcher.Junction.AbstractBase<T extends ClassLoader>
Class Inheritance
Annotations
@Enhance
Type Parameters
<T>
The exact type of the class loader that is matched.
Imports
net.bytebuddy.build.HashCodeAndEqualsPlugin, net.bytebuddy.utility.nullability.MaybeNull

An element matcher that matches all java.lang.ClassLoaders in the matched class loaders hierarchy against a given matcher.

Field Summary

Modifier and TypeField and Description
private final ElementMatcher<? super ClassLoader>
matcher

The matcher to apply on each class loader in the hierarchy.

Constructor Summary

AccessConstructor and Description
public
ClassLoaderHierarchyMatcher(ElementMatcher<? super ClassLoader>
The matcher to apply on each class loader in the hierarchy.
matcher
)

Creates a new class loader hierarchy matcher.

Method Summary

Modifier and TypeMethod and Description
public boolean
matches(T
The instance to be matched or null.
target
)

Implements net.bytebuddy.matcher.ElementMatcher.matches.

Matches a target against this element matcher.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase:
andor

Field Detail

matcherback to summary
private final ElementMatcher<? super ClassLoader> matcher

The matcher to apply on each class loader in the hierarchy.

Constructor Detail

ClassLoaderHierarchyMatcherback to summary
public ClassLoaderHierarchyMatcher(ElementMatcher<? super ClassLoader> matcher)

Creates a new class loader hierarchy matcher.

Parameters
matcher:ElementMatcher<? super ClassLoader>

The matcher to apply on each class loader in the hierarchy.

Method Detail

matchesback to summary
public boolean matches(T target)

Implements net.bytebuddy.matcher.ElementMatcher.matches.

Doc from net.bytebuddy.matcher.ElementMatcher.matches.

Matches a target against this element matcher.

Parameters
target:T

The instance to be matched or null.

Returns:boolean

true if the given element is matched by this matcher or false otherwise.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override