Class Rule
- java.lang.Object
-
- io.swagger.codegen.v3.ignore.rules.Rule
-
- Direct Known Subclasses:
EverythingRule,FileRule,InvalidRule,RootedFileRule
public abstract class Rule extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRule.Operation
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Rulecreate(String definition)Rule.Operationevaluate(String relativePath)StringgetDefinition()protected Rule.OperationgetExcludeOperation()protected Rule.OperationgetIncludeOperation()BooleangetNegated()Whether or not the rule should be negated.protected StringgetPattern()abstract Booleanmatches(String relativePath)
-
-
-
Method Detail
-
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:
trueif the rule is negated (inverse), otherwisefalse(normal).
-
evaluate
public Rule.Operation evaluate(String relativePath)
-
getIncludeOperation
protected Rule.Operation getIncludeOperation()
-
getExcludeOperation
protected Rule.Operation getExcludeOperation()
-
-