Class CustomClassFilter.Static

  • All Implemented Interfaces:
    ExtensionPoint, CustomClassFilter
    Enclosing interface:
    CustomClassFilter

    @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
    @Extension
    public static class CustomClassFilter.Static
    extends Object
    implements CustomClassFilter
    Standard filter which pays attention to a system property. To use, specify a system property hudson.remoting.ClassFilter containing a comma-separated list of Class.getName() to whitelist. Entries may also be preceded by ! to blacklist. Example: -Dhudson.remoting.ClassFilter=com.google.common.collect.LinkedListMultimap,!com.acme.illadvised.YoloReflectionFactory$Handle
    • Field Detail

      • overrides

        public final Map<String,​Boolean> overrides
        Map from Class.getName() to true to permit, false to reject. Unmentioned classes are not treated specially. Intentionally public for possible mutation without restart by Groovy scripting.
    • Constructor Detail

      • Static

        public Static()
    • Method Detail

      • permits

        public Boolean permits​(Class<?> c)
        Description copied from interface: CustomClassFilter
        Determine whether a class should be permitted by ClassFilter.isBlacklisted(Class) of ClassFilter.DEFAULT.
        Specified by:
        permits in interface CustomClassFilter
        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

        public Boolean permits​(String name)
        Description copied from interface: CustomClassFilter
        Determine whether a class should be permitted by ClassFilter.isBlacklisted(String) of ClassFilter.DEFAULT.
        Specified by:
        permits in interface CustomClassFilter
        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)