Class ExtensionPointFilter

  • All Implemented Interfaces:
    Filter<Element>

    public class ExtensionPointFilter
    extends Object
    implements Filter<Element>
    Filter implementation that can be used to match extension points and extensions based on the ID of the extension point.

    Extensions points will pass the filter if their ID matches the given pattern.

    Extensions will pass the filter if the ID of the extension point they are extending matches the given pattern.

    Since:
    3.0
    Author:
    Nicklas
    Last modified
    $Date: 2016-11-14 13:43:01 +0100 (må, 14 nov 2016) $
    • Field Detail

      • log

        private static final org.slf4j.Logger log
      • pattern

        private final Pattern pattern
    • Constructor Detail

      • ExtensionPointFilter

        public ExtensionPointFilter​(Pattern pattern)
        Create a new filter based on the given pattern.
        Parameters:
        pattern - A pattern, null is not allowed
      • ExtensionPointFilter

        public ExtensionPointFilter​(String pattern)
        Create a new filter based on the given pattern.
        Parameters:
        pattern - A pattern that will be used in Pattern.compile(String), null is not allowed
    • Method Detail

      • evaluate

        public boolean evaluate​(Element tag)
        Description copied from interface: Filter
        Evaluate if the given object should pass the filter or not.
        Specified by:
        evaluate in interface Filter<Element>
        Parameters:
        tag - The object to evaluate
        Returns:
        TRUE if the object passes the filter, FALSE otherwise