Class NameMatchingDelegate
java.lang.Object
com.redhat.parodos.patterndetection.clue.delegate.NameMatchingDelegate
Wraps the logic around file/folder name matching
- Author:
- Luke Shannon (Github: lshannon)
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleandoesNameMatch(String name) Returns a true is a file/folder name matches.booleanDetermines if a Target File Extension is a match.booleanshouldProcessFile(File currentFile) Checks if a File is a target file for processing by the Clue.
-
Method Details
-
doesNameMatch
Returns a true is a file/folder name matches. Regex is applied if 'targetFileNamePatternString' was set when this object was created- Parameters:
name- of the file/folder- Returns:
- true if its a match, false is not
-
isThisATargetFileExtension
Determines if a Target File Extension is a match. If 'targetFileExtensionPatternString' is specified at creation, then Regex will be applied when matching- Parameters:
file- the file that the extension check will be applied too- Returns:
- true if the file extension is a match, false if not. Regex is applied if 'targetFileExtensionPatternString' was specified
-
shouldProcessFile
Checks if a File is a target file for processing by the Clue. This check is based on the ignoreFileNamePattern and the targetFileExtensionPattern- Parameters:
currentFile- file to be processed- Returns:
- true if it should be processed, false if it should be ignored
-