Class SimpleNameFilter

java.lang.Object
de.uni_hildesheim.sse.easy.loader.framework.SimpleNameFilter
All Implemented Interfaces:
IBundleFilter
Direct Known Subclasses:
SimpleManifestNameFilter

public class SimpleNameFilter extends Object implements IBundleFilter
Implements a simple name filter filtering both, JAR name and symbolic name for the given regular expression.
Author:
Holger Eichelberger
  • Field Details

    • pattern

      private Pattern pattern
  • Constructor Details

    • SimpleNameFilter

      public SimpleNameFilter(String regEx) throws PatternSyntaxException
      Creates a simple name filter from the given Java regular expression.
      Parameters:
      regEx - the regular expression to be considered
      Throws:
      PatternSyntaxException - in case that the pattern syntax is wrong
  • Method Details

    • getPattern

      protected Pattern getPattern()
      Returns the match pattern.
      Returns:
      the match pattern
    • acceptJar

      public boolean acceptJar(File jar)
      Description copied from interface: IBundleFilter
      Returns whether the given jar shall be accepted.
      Specified by:
      acceptJar in interface IBundleFilter
      Parameters:
      jar - the JAR to be analyzed
      Returns:
      true if it shall be accepted, false else
    • acceptSymbolicName

      public boolean acceptSymbolicName(String name)
      Description copied from interface: IBundleFilter
      Returns whether the given symbolic name shall be accepted.
      Specified by:
      acceptSymbolicName in interface IBundleFilter
      Parameters:
      name - the name to be analyzed
      Returns:
      true if it shall be accepted, false else