Interface CustomClassFilter

All Superinterfaces:
ExtensionPoint
All Known Implementing Classes:
CustomClassFilter.Contributed, CustomClassFilter.Static

public interface CustomClassFilter extends ExtensionPoint
Allows extensions to adjust the behavior of ClassFilter.DEFAULT. Custom filters can be called frequently, and return values are uncached, so implementations should be fast.
Since:
2.102
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Standard filter which can load whitelists and blacklists from plugins.
    static class 
    Standard filter which pays attention to a system property.

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    ExtensionPoint.LegacyInstancesAreScopedToHudson
  • Method Summary

    Modifier and Type
    Method
    Description
    default Boolean
    permits(Class<?> c)
    Determine whether a class should be permitted by ClassFilter.isBlacklisted(Class) of ClassFilter.DEFAULT.
    default Boolean
    Determine whether a class should be permitted by ClassFilter.isBlacklisted(String) of ClassFilter.DEFAULT.
  • Method Details

    • permits

      @CheckForNull default Boolean permits(Class<?> c)
      Determine whether a class should be permitted by ClassFilter.isBlacklisted(Class) of ClassFilter.DEFAULT.
      Parameters:
      c - the class
      Returns:
      true to permit it when it would normally be rejected (for example due to having a custom serialization method and being from a third-party library); false to reject it when it would normally be permitted; null to express no opinion (the default)
    • permits

      @CheckForNull default Boolean permits(String name)
      Determine whether a class should be permitted by ClassFilter.isBlacklisted(String) of ClassFilter.DEFAULT.
      Parameters:
      name - a class name
      Returns:
      true to permit it when it would normally be rejected (currently useless); false to reject it when it would normally be permitted (currently due to ClassFilter.STANDARD; null to express no opinion (the default)