| java.lang.Object org.codehaus.janino.tools.JGrep
JGrep | public class JGrep (Code) | | Reads a set of compilation units from the file system and searches it for specific
JavaTM constructs, e.g. invocations of a particular method.
Usage:
java org.codehaus.janino.JGrep \
[ -dirs directory-name-patterns ] \
[ -files file-name-patterns ] \
{ directory-path } \
-method-invocation class.method(arg-types)
java org.codehaus.janino.JGrep -help
If "-dirs" is not given, then all directory-pathes are scanned for files.
The directory-name-patterns work as described in
org.codehaus.janino.util.StringPattern.parseCombinedPattern(String) .
If "-files" is not given, then all files ending in ".java" are read. The
file-name-patterns work as described in
org.codehaus.janino.util.StringPattern.parseCombinedPattern(String) .
|
Inner Class :public interface MethodInvocationPredicate | |
Inner Class :public interface MethodInvocationAction | |
Constructor Summary | |
public | JGrep(File[] classPath, File[] optionalExtDirs, File[] optionalBootClassPath, String optionalCharacterEncoding, boolean verbose) | public | JGrep(IClassLoader iClassLoader, String optionalCharacterEncoding, boolean verbose) |
Method Summary | |
public static File | getClassFile(String className, File sourceFile, File optionalDestinationDirectory) Construct the name of a file that could store the byte code of the class with the given
name.
If optionalDestinationDirectory is non-null, the returned path is the
optionalDestinationDirectory plus the package of the class (with dots replaced
with file separators) plus the class name plus ".class". | public void | jGrep(File[] rootDirectories, StringPattern[] directoryNamePatterns, StringPattern[] fileNamePatterns, List methodInvocationTargets) | public void | jGrep(Iterator sourceFilesIterator, List methodInvocationTargets) | public static void | main(String[] args) Command line interface. | static boolean | typeMatches(String pattern, String typeName) |
JGrep | public JGrep(File[] classPath, File[] optionalExtDirs, File[] optionalBootClassPath, String optionalCharacterEncoding, boolean verbose)(Code) | | |
getClassFile | public static File getClassFile(String className, File sourceFile, File optionalDestinationDirectory)(Code) | | Construct the name of a file that could store the byte code of the class with the given
name.
If optionalDestinationDirectory is non-null, the returned path is the
optionalDestinationDirectory plus the package of the class (with dots replaced
with file separators) plus the class name plus ".class". Example:
"destdir/pkg1/pkg2/Outer$Inner.class"
If optionalDestinationDirectory is null, the returned path is the
directory of the sourceFile plus the class name plus ".class". Example:
"srcdir/Outer$Inner.class"
Parameters: className - E.g. "pkg1.pkg2.Outer$Inner" Parameters: sourceFile - E.g. "srcdir/Outer.java" Parameters: optionalDestinationDirectory - E.g. "destdir" |
main | public static void main(String[] args)(Code) | | Command line interface.
|
|
|