public class CodegenIgnoreProcessor extends Object
| Constructor and Description |
|---|
CodegenIgnoreProcessor(File targetIgnoreFile)
Constructs an instance of
CodegenIgnoreProcessor from an ignore file defined by targetIgnoreFile. |
CodegenIgnoreProcessor(String baseDirectory)
Loads the default ignore file (.swagger-codegen-ignore) from the specified path.
|
CodegenIgnoreProcessor(String baseDirectory,
String ignoreFile)
Loads the specified ignore file by name ([ignoreFile]) from the specified path.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsFile(File targetFile)
Determines whether or not a file defined by
toEvaluate is allowed,
under the exclusion rules from the ignore file being processed. |
List<Rule> |
getExclusionRules()
Allows a consumer to manually inspect all "exclusion rules".
|
List<Rule> |
getInclusionRules()
Allows a consumer to manually inspect explicit "inclusion rules".
|
public CodegenIgnoreProcessor(String baseDirectory)
baseDirectory - The base directory of the files to be processed. This contains the ignore file.public CodegenIgnoreProcessor(String baseDirectory, String ignoreFile)
baseDirectory - The base directory of the files to be processed. This contains the ignore file.ignoreFile - The file containing ignore patterns.public CodegenIgnoreProcessor(File targetIgnoreFile)
CodegenIgnoreProcessor from an ignore file defined by targetIgnoreFile.targetIgnoreFile - The ignore file location.public boolean allowsFile(File targetFile)
toEvaluate is allowed,
under the exclusion rules from the ignore file being processed.targetFile - The file to check against exclusion rules from the ignore file.false if file matches any pattern in the ignore file (disallowed), otherwise true (allowed).public List<Rule> getInclusionRules()
ImmutableList.copyOf(Collection) of rules which possibly negate exclusion rules in the ignore file.public List<Rule> getExclusionRules()
getInclusionRules() rules.
NOTE: Existence in this list doesn't mean a file is excluded. The rule can be overridden by getInclusionRules() rules.ImmutableList.copyOf(Collection) of rules which define exclusions by patterns in the ignore file.Copyright © 2018. All rights reserved.