|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.pfl.basic.tools.file.Recognizer
public class Recognizer
Recognizes files according to patterns, and performs actions accordingly.
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void dump()
public String toString()
toString in class Object
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 org.glassfish.pfl.basic.func.UnaryPredicate<FileWrapper>file - The file to act upon.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||