java.lang.Object
io.swagger.codegen.v3.ignore.rules.Rule
Direct Known Subclasses:
EverythingRule, FileRule, InvalidRule, RootedFileRule

public abstract class Rule extends Object
  • Method Details

    • matches

      public abstract Boolean matches(String relativePath)
    • getDefinition

      public String getDefinition()
    • getPattern

      protected String getPattern()
    • getNegated

      public Boolean getNegated()
      Whether or not the rule should be negated. !foo means foo should be removed from previous matches. Example: **\/*.bak excludes all backup. Adding !/test.bak will include test.bak in the project root.

      NOTE: It is not possible to re-include a file if a parent directory of that file is excluded.

      Returns:
      true if the rule is negated (inverse), otherwise false (normal).
    • evaluate

      public Rule.Operation evaluate(String relativePath)
    • getIncludeOperation

      protected Rule.Operation getIncludeOperation()
    • getExcludeOperation

      protected Rule.Operation getExcludeOperation()
    • create

      public static Rule create(String definition)