Class 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.
    • 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 interface ElementMatcher<T>
        Parameters:
        target - The instance to be matched.
        Returns:
        true if the given element is matched by this matcher or false otherwise.
      • resolve

        protected int resolve​(int modifiers)
        Resolves a modifier.
        Parameters:
        modifiers - The original modifiers.
        Returns:
        The resolved modifiers.