mk.fsgrep.match
Class FileSearch

java.lang.Object
  extended by mk.fsgrep.match.FileSearch
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
FilenameSearch, TextSearch, ZipSearch

public abstract class FileSearch
extends java.lang.Object
implements java.lang.Runnable

Search for a regular expression in a file.

Author:
Murali Krishnan

Constructor Summary
FileSearch()
           
 
Method Summary
 int getCount()
           
protected  TargetFile getFile()
           
 int getLinesSearched()
           
protected  Fsgrep getModel()
           
 MatchResult getOrCreateResults()
           
protected  java.util.regex.Pattern getRE()
           
 MatchResult getResults()
           
protected  void incrementCount()
           
protected  void incrementLinesSearched()
           
 void initialize(java.util.regex.Pattern pRE, TargetFile pFile, Fsgrep pModel)
           
 void run()
           
abstract  void search()
           
 void setResults(MatchResult val)
           
 void stopAfterFirstMatch()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSearch

public FileSearch()
Method Detail

getRE

protected java.util.regex.Pattern getRE()

getFile

protected TargetFile getFile()

getModel

protected Fsgrep getModel()

getCount

public int getCount()

getResults

public MatchResult getResults()

getLinesSearched

public int getLinesSearched()

setResults

public void setResults(MatchResult val)

incrementCount

protected void incrementCount()

incrementLinesSearched

protected void incrementLinesSearched()

getOrCreateResults

public MatchResult getOrCreateResults()

initialize

public void initialize(java.util.regex.Pattern pRE,
                       TargetFile pFile,
                       Fsgrep pModel)

run

public void run()
Specified by:
run in interface java.lang.Runnable

search

public abstract void search()

stopAfterFirstMatch

public void stopAfterFirstMatch()


Copyright © 2009. All Rights Reserved.