Package com.isocra.utils.jarSearch

Provides utilities for searching through directories or the CLASSPATH for specific classes and other resources.

See:
          Description

Class Summary
ClasspathSearcher This class searches through the jars in the classes in the CLASSPATH and looks at the names of the contents to match the specified searchJar string.
DirectorySearcher This class searches through the jars in a searchJar path and looks at the names of the contents to match the specified searchJar string.
EntryNameVisitor Checks to see if the name of the entry matches the pattern we're looking for
EntryVisitor EntryVisitor is the abstract class for visitors which will be called on every file inside a Jar
 

Package com.isocra.utils.jarSearch Description

Provides utilities for searching through directories or the CLASSPATH for specific classes and other resources.

This package contains classes that will search through either a specified directory (DirectorySearcher), or your CLASSPATH (ClasspathSearcher) and list all the files (even inside jars) that match the specified pattern.

The pattern is specified using a java Regular expression, so examples of useful patterns are:

To use the utilities, compile the classes and then execute either:
com.isocra.utils.jarSearch.DirectorySearcher <directory> <pattern>
Searches in the specified directory for matching files. It will search recursively through subdirectories and inside jar files.
com.isocra.utils.jarSearch.ClasspathSearcher <pattern>
Searches in the current CLASSPATH. It will search each element of the CLASSPATH, if it is a directory, it searches recursively through the directory, if it is a jar, it searches that, if it is a file, it checks to see if that file matches.

Package Specification

Uses the Java regular expression classes to match against filenames (including inside jars).

Related Documentation

For more information, please see:



Copyright © 2004 Isocra Ltd. All Rights Reserved.