|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dokutransdata.antlatex.Grep1
public class Grep1
A grep-like program. No options, but takes a pattern and an arbitrary list of text files.
Field Summary | |
---|---|
protected java.util.regex.Matcher |
matcher
The matcher for this pattern |
protected java.util.regex.Pattern |
pattern
The pattern we're looking for |
static java.lang.String |
RCS_ID
|
Constructor Summary | |
---|---|
Grep1(java.lang.String patt)
Construct a Grep1 program |
Method Summary | |
---|---|
static int |
doit(java.lang.String[] argv,
boolean verbose)
Main will make a Grep object for the pattern, and run it on all input files listed in argv. |
boolean |
getVerbose()
|
int |
process(java.io.BufferedReader inputFile,
java.lang.String fileName,
boolean printFileName)
Do the work of scanning one file |
void |
setVerbose(boolean verbose)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RCS_ID
protected java.util.regex.Pattern pattern
protected java.util.regex.Matcher matcher
Constructor Detail |
---|
public Grep1(java.lang.String patt)
Method Detail |
---|
public static int doit(java.lang.String[] argv, boolean verbose) throws java.lang.Exception
java.lang.Exception
public int process(java.io.BufferedReader inputFile, java.lang.String fileName, boolean printFileName)
inputFile
- BufferedReader object already openfileName
- String Name of the input fileprintFileName
- Boolean - true to print filename before lines that match.
public boolean getVerbose()
public final void setVerbose(boolean verbose)
verbose
- The verbose to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |