Interface ProxiedMethodFilter

  • All Known Implementing Classes:
    GroovyMethodFilter
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ProxiedMethodFilter
    Allows certain bean class methods to be ignored when creating a proxy / subclass. An example would be Groovy integration where each groovy object implements the GroovyObject interface. However, when the methods defined by this interface are implemented by Weld proxy / subclass, Groovy runtime does not work correctly any longer. An implementation of ProxiedMethodFilter may be used to filter out bean class methods that should not be implemented by a proxy / subclass.
    Author:
    Jozef Hartinger, Martin Kouba
    See Also:
    GroovyMethodFilter
    • Method Detail

      • isEnabled

        default boolean isEnabled()
        Determines whether this filter is enabled. E.g. GroovyMethodFilter is only enabled in Groovy environment
        Returns:
        true if this method filter should be used
      • accept

        boolean accept​(Method method,
                       Class<?> proxySuperclass)
        Determines, whether the given method should be implemented by the proxy / subclass or not.
        Parameters:
        method - the given method
        proxySuperclass - the class the proxy extends directly
        Returns:
        true iff the method filter does not ban the given method from being implemented