dutils.digger
Class DiggerUtils
java.lang.Object
|
+--dutils.digger.DiggerUtils
- public class DiggerUtils
- extends java.lang.Object
A class with utility methods.
- Version:
- 1.0
- Author:
- Daniel Or
Method Summary |
static java.lang.String |
bslash2slash(java.lang.String s)
|
static java.lang.String |
getCanonicalPath(java.io.File f)
|
static java.lang.String |
hasFieldInClass(java.io.InputStream clazzIS,
java.lang.String[] toFind,
java.lang.String[] excludes)
|
static java.lang.String |
hasFieldInClass(java.io.InputStream clazzIS,
java.lang.String[] toFind,
java.lang.String[] excludes,
boolean caseSensitive)
|
static java.lang.String |
hasMethodInClass(java.io.InputStream clazzIS,
java.lang.String[] toFind,
java.lang.String[] excludes)
|
static java.lang.String |
hasMethodInClass(java.io.InputStream clazzIS,
java.lang.String[] toFind,
java.lang.String[] excludes,
boolean caseSensitive)
|
static boolean |
isArchive(java.lang.String aname)
|
static java.util.HashSet |
string2HashSet(java.lang.String s)
s is a string for tokenizing with ';' as
delimiter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DiggerUtils
public DiggerUtils()
getCanonicalPath
public static java.lang.String getCanonicalPath(java.io.File f)
string2HashSet
public static java.util.HashSet string2HashSet(java.lang.String s)
- s is a string for tokenizing with ';' as
delimiter.
isArchive
public static boolean isArchive(java.lang.String aname)
- Returns:
hasMethodInClass
public static java.lang.String hasMethodInClass(java.io.InputStream clazzIS,
java.lang.String[] toFind,
java.lang.String[] excludes)
- Parameters:
clazzIS
- an InputStream
of a java class file.toFind
- a String
array with the values that are to be
found.
- Returns:
- the first method that is found which name contains all values in the
toFind array (if one does not exist- returns null).
hasMethodInClass
public static java.lang.String hasMethodInClass(java.io.InputStream clazzIS,
java.lang.String[] toFind,
java.lang.String[] excludes,
boolean caseSensitive)
- Parameters:
clazzIS
- an InputStream
of a java class file.toFind
- a String
array with the values that are to be
found.
- Returns:
- the first method that is found which name contains all values in the
toFind array (if one does not exist- returns null).
hasFieldInClass
public static java.lang.String hasFieldInClass(java.io.InputStream clazzIS,
java.lang.String[] toFind,
java.lang.String[] excludes)
- Parameters:
clazzIS
- an InputStream
of a java class file.toFind
- a String
array with the values that are to be
found.
- Returns:
- the first field that is found which name contains all values in the
toFind array (if one does not exist- returns null).
hasFieldInClass
public static java.lang.String hasFieldInClass(java.io.InputStream clazzIS,
java.lang.String[] toFind,
java.lang.String[] excludes,
boolean caseSensitive)
- Parameters:
clazzIS
- an InputStream
of a java class file.toFind
- a String
array with the values that are to be
found.
- Returns:
- the first field that is found which name contains all values in the
toFind array (if one does not exist- returns null).
bslash2slash
public static java.lang.String bslash2slash(java.lang.String s)