public class Recognizer extends Object implements Scanner.Action
| Modifier and Type | Method and Description |
|---|---|
void |
addKnownName(String name,
Scanner.Action action) |
void |
addKnownSuffix(String suffix,
Scanner.Action action) |
void |
dump() |
boolean |
evaluate(FileWrapper file)
Apply the action that matches the classification of this file.
|
void |
setDefaultAction(Scanner.Action action)
This defines the default action.
|
void |
setShellScriptAction(Scanner.Action action)
If set, this defines the action taken for text files that start with the
patter "#!", which is the standard for all *nix shell scripts.
|
String |
toString() |
public void dump()
public void addKnownName(String name, Scanner.Action action)
public void addKnownSuffix(String suffix, Scanner.Action action)
public void setShellScriptAction(Scanner.Action action)
action - The action to perform on shell scripts.public void setDefaultAction(Scanner.Action action)
action - The default action is nothing else matches.public boolean evaluate(FileWrapper file)
evaluate in interface UnaryPredicate<FileWrapper>file - The file to act upon.Copyright © 2011–2019 Eclipse Foundation. All rights reserved.