Class RebaseDynamicTypeBuilder.RebaseableMatcher
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.inline.RebaseDynamicTypeBuilder.RebaseableMatcher
-
- All Implemented Interfaces:
ElementMatcher<MethodDescription.Token>
- Enclosing class:
- RebaseDynamicTypeBuilder<T>
@Enhance protected static class RebaseDynamicTypeBuilder.RebaseableMatcher extends Object implements ElementMatcher<MethodDescription.Token>
A matcher that filters any method that should not be rebased, i.e. that is not already defined by the original type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RebaseableMatcher(Set<MethodDescription.Token> tokens)
Creates a new matcher for identifying rebasable methods.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(MethodDescription.Token target)
Matches a target against this element matcher.protected static ElementMatcher<MethodDescription.Token>
of(TypeDescription instrumentedType, MethodList<?> instrumentedMethods)
Returns a matcher that filters any method that should not be rebased.
-
-
-
Constructor Detail
-
RebaseableMatcher
protected RebaseableMatcher(Set<MethodDescription.Token> tokens)
Creates a new matcher for identifying rebasable methods.- Parameters:
tokens
- A set of method tokens representing all instrumented methods.
-
-
Method Detail
-
of
protected static ElementMatcher<MethodDescription.Token> of(TypeDescription instrumentedType, MethodList<?> instrumentedMethods)
Returns a matcher that filters any method that should not be rebased.- Parameters:
instrumentedType
- The instrumented type.instrumentedMethods
- All instrumented methods.- Returns:
- A suitable matcher that filters all methods that should not be rebased.
-
matches
public boolean matches(MethodDescription.Token target)
Matches a target against this element matcher.- Specified by:
matches
in interfaceElementMatcher<MethodDescription.Token>
- Parameters:
target
- The instance to be matched.- Returns:
true
if the given element is matched by this matcher orfalse
otherwise.
-
-