|
|||||||||
| 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(java.lang.String name,
Scanner.Action action)
|
void |
addKnownSuffix(java.lang.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. |
java.lang.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 java.lang.String toString()
toString in class java.lang.Object
public void addKnownName(java.lang.String name,
Scanner.Action action)
public void addKnownSuffix(java.lang.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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||