com.isocra.utils.jarSearch
Class EntryVisitor

java.lang.Object
  extended bycom.isocra.utils.jarSearch.EntryVisitor
Direct Known Subclasses:
EntryNameVisitor

public abstract class EntryVisitor
extends java.lang.Object

EntryVisitor is the abstract class for visitors which will be called on every file inside a Jar


Constructor Summary
EntryVisitor()
           
 
Method Summary
abstract  java.lang.String getResults()
          get the results as a string, like that we have a choice about how to output them
 boolean isJar(java.io.File file)
          Takes in a file returns true if the name of the file ends in .JAR (regardless of case)
 void searchDir(java.io.File directory)
          Search through a directory looking for jars or class files
 void searchJar(java.io.File jarFile)
          Search through the jar file visiting every entry to see if it matches
abstract  void visit(java.io.File file)
          visit a file rather than a jar entry
abstract  void visit(java.util.jar.JarFile jar, java.util.jar.JarEntry entry)
          visit is called on every entry in the current jar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryVisitor

public EntryVisitor()
Method Detail

visit

public abstract void visit(java.util.jar.JarFile jar,
                           java.util.jar.JarEntry entry)
visit is called on every entry in the current jar

Parameters:
jar - the jar file we're currently searching (we need this so that we can output the name)
entry - the entry that we're trying to match against.

visit

public abstract void visit(java.io.File file)
visit a file rather than a jar entry

Parameters:
file - the file we're trying to match against.

getResults

public abstract java.lang.String getResults()
get the results as a string, like that we have a choice about how to output them


isJar

public boolean isJar(java.io.File file)
Takes in a file returns true if the name of the file ends in .JAR (regardless of case)


searchJar

public void searchJar(java.io.File jarFile)
Search through the jar file visiting every entry to see if it matches


searchDir

public void searchDir(java.io.File directory)
Search through a directory looking for jars or class files



Copyright © 2004 Isocra Ltd. All Rights Reserved.