| java.lang.Object org.netbeans.lib.profiler.utils.MiscUtils
MiscUtils | public class MiscUtils implements CommonConstants(Code) | | Miscellaneous utilities for class names/path management, file management, and printing/logging.
author: Tomas Hurka author: Misha Dmitriev author: Ian Formanek |
Method Summary | |
public static File | checkDirForName(String name) | public static File | checkFile(File file, boolean isDir) | public static File | checkFileForName(String name) | public static boolean | containsDirectoryOnPath(String directory, String path) | public static void | deleteHeapTempFiles() | public static boolean | fileForNameOk(String name) | public static String | getAbsoluteFilePath(String fileName, String baseDir) | public static void | getAllClassesInDir(String dirName, String packageName, boolean removeClassExt, Collection res) | public static void | getAllClassesInJar(String jarName, boolean removeClassExt, Collection res) | public static String | getCanonicalPath(File file) | public static String | getClassNameForSource(String sourceFileName, String mainSourcePath, String secondarySourcePath, String workingDir) | public static String | getFirstPathComponent(String path) | public static String | getJDKVersionForJVMExeFile(File exeFile) | public static String | getLiveClassPathSubset(String path, String workingDir) For a string representing a class path, remove all entries that don't correspond to existing files, and return the remaining ones. | public static ArrayList | getPathComponents(String path, boolean doCheck, String workingDir) Returns the components of the compound path, such as CLASSPATH. | public static boolean | inSamePackage(String className1, String className2) | public static void | internalError(String message) Method to handle internal error condition. | public static boolean | isSlashedJavaCoreClassName(String name) | public static boolean | isSupportedJVM(Map jdkProperties) | public static boolean | isSupportedRunningJVMVersion(String jdkVersionString) | public static void | printErrorMessage(String message) | public static void | printInfoMessage(String message) | public static void | printVerboseInfoMessage(String message) | public static void | printVerboseInfoMessage(String[] elements) | public static void | printWarningMessage(String message) | public static byte[] | readFileIntoBuffer(FileOrZipEntry fileOrZip) | public static void | setSilent(boolean silent) | public static void | setVerbosePrint() |
containsDirectoryOnPath | public static boolean containsDirectoryOnPath(String directory, String path)(Code) | | Checks if given directory is already listed on path
|
deleteHeapTempFiles | public static void deleteHeapTempFiles()(Code) | | |
fileForNameOk | public static boolean fileForNameOk(String name)(Code) | | |
getAllClassesInJar | public static void getAllClassesInJar(String jarName, boolean removeClassExt, Collection res)(Code) | | |
getClassNameForSource | public static String getClassNameForSource(String sourceFileName, String mainSourcePath, String secondarySourcePath, String workingDir)(Code) | | Determine the outermost class name for the given source file, based on the available source path
Parameters: sourceFileName - the name of the source file Parameters: mainSourcePath - the main source path to search within Parameters: secondarySourcePath - the secondary source path to search within |
getLiveClassPathSubset | public static String getLiveClassPathSubset(String path, String workingDir)(Code) | | For a string representing a class path, remove all entries that don't correspond to existing files, and return the remaining ones.
|
getPathComponents | public static ArrayList getPathComponents(String path, boolean doCheck, String workingDir)(Code) | | Returns the components of the compound path, such as CLASSPATH. If doCheck is true,
checks if each of the components really exists, i.e. is an existing directory or file,
and returns only existing components. workingDir is needed in case the passed path has
a local form.
|
inSamePackage | public static boolean inSamePackage(String className1, String className2)(Code) | | |
internalError | public static void internalError(String message)(Code) | | Method to handle internal error condition.
Parameters: message - The message describing the error |
isSlashedJavaCoreClassName | public static boolean isSlashedJavaCoreClassName(String name)(Code) | | |
isSupportedJVM | public static boolean isSupportedJVM(Map jdkProperties)(Code) | | |
isSupportedRunningJVMVersion | public static boolean isSupportedRunningJVMVersion(String jdkVersionString)(Code) | | |
printErrorMessage | public static void printErrorMessage(String message)(Code) | | |
printInfoMessage | public static void printInfoMessage(String message)(Code) | | |
printVerboseInfoMessage | public static void printVerboseInfoMessage(String message)(Code) | | |
printVerboseInfoMessage | public static void printVerboseInfoMessage(String[] elements)(Code) | | |
printWarningMessage | public static void printWarningMessage(String message)(Code) | | |
setSilent | public static void setSilent(boolean silent)(Code) | | |
setVerbosePrint | public static void setVerbosePrint()(Code) | | |
|
|