Package net.bytebuddy.asm
Class ModifierAdjustment.Adjustment<T>
- java.lang.Object
-
- net.bytebuddy.asm.ModifierAdjustment.Adjustment<T>
-
- Type Parameters:
T
- The type of the adjusted element's description.
- All Implemented Interfaces:
ElementMatcher<T>
- Enclosing class:
- ModifierAdjustment
@Enhance protected static class ModifierAdjustment.Adjustment<T> extends java.lang.Object implements ElementMatcher<T>
A description of a conditional adjustment.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
-
-
Field Summary
Fields Modifier and Type Field Description private ElementMatcher<? super T>
matcher
The matcher to determine an adjustment.private ModifierContributor.Resolver<?>
resolver
The resolver to apply.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Adjustment(ElementMatcher<? super T> matcher, ModifierContributor.Resolver<?> resolver)
Creates a new adjustment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(T target)
Matches a target against this element matcher.protected int
resolve(int modifiers)
Resolves a modifier.
-
-
-
Field Detail
-
matcher
private final ElementMatcher<? super T> matcher
The matcher to determine an adjustment.
-
resolver
private final ModifierContributor.Resolver<?> resolver
The resolver to apply.
-
-
Constructor Detail
-
Adjustment
protected Adjustment(ElementMatcher<? super T> matcher, ModifierContributor.Resolver<?> resolver)
Creates a new adjustment.- Parameters:
matcher
- The matcher to determine an adjustment.resolver
- The resolver to apply.
-
-
Method Detail
-
matches
public boolean matches(T target)
Matches a target against this element matcher.- Specified by:
matches
in interfaceElementMatcher<T>
- Parameters:
target
- The instance to be matched.- Returns:
true
if the given element is matched by this matcher orfalse
otherwise.
-
resolve
protected int resolve(int modifiers)
Resolves a modifier.- Parameters:
modifiers
- The original modifiers.- Returns:
- The resolved modifiers.
-
-