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>matcherThe matcher to determine an adjustment.private ModifierContributor.Resolver<?>resolverThe resolver to apply.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAdjustment(ElementMatcher<? super T> matcher, ModifierContributor.Resolver<?> resolver)Creates a new adjustment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(T target)Matches a target against this element matcher.protected intresolve(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(@MaybeNull T target)
Matches a target against this element matcher.- Specified by:
matchesin interfaceElementMatcher<T>- Parameters:
target- The instance to be matched ornull.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
resolve
protected int resolve(int modifiers)
Resolves a modifier.- Parameters:
modifiers- The original modifiers.- Returns:
- The resolved modifiers.
-
-