Class Rule
- java.lang.Object
-
- org.openapitools.codegen.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 class
Rule.Operation
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Rule
create(String definition)
Rule.Operation
evaluate(String relativePath)
String
getDefinition()
protected Rule.Operation
getExcludeOperation()
protected Rule.Operation
getIncludeOperation()
Boolean
getNegated()
Whether or not the rule should be negated.protected String
getPattern()
abstract Boolean
matches(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:
true
if the rule is negated (inverse), otherwisefalse
(normal).
-
evaluate
public Rule.Operation evaluate(String relativePath)
-
getIncludeOperation
protected Rule.Operation getIncludeOperation()
-
getExcludeOperation
protected Rule.Operation getExcludeOperation()
-
-