public final class ClasspathUtility extends Object implements UtilMessages
| Modifier and Type | Field and Description |
|---|---|
private static String |
CLASSPATH
The classpath of the current java executable or current folder if not defined.
|
private static String |
CLASSPATH_SEPARATOR
String to separate all classpath entries.
|
private static JRLogger |
LOGGER
The class logger.
|
static String |
SEPARATOR
The separator used for serialization.
|
ARGUMENT_DETAIL, ARGUMENT_LIST, BAD_CANONICAL_PATH, BROKEN_API_NO_METHOD, BROKEN_API_WRONG_PARAMETERS, BROKEN_WAVE_BAD_ITEM_LIST, BROKEN_WAVE_SENT, CANT_READ_CACHED_JAR_FILE, FILE_UNREADABLE, GENERIC_TYPE_ERROR_1, GENERIC_TYPE_ERROR_2, NO_ANNOTATION_PROPERTY, NO_ANNOTATION_PROPERTY_VALUE, NO_CONSTRUCTOR, PARSE_CACHED_JAR_FILE, RESOURCE_IGNORED, USE_DEFAULT_CLASSLOADER, USE_JNLP_CLASSLOADER, WAVE_HANDLER_METHOD_REQUIRED| Modifier | Constructor and Description |
|---|---|
private |
ClasspathUtility()
Private Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
checkResource(List<String> resources,
Pattern searchPattern,
String resourceName)
Check if the resource match the regex.
|
static Collection<String> |
getClasspathResources(Pattern searchPattern)
Retrieve all resources that match the search pattern from the java.class.path.
|
private static List<String> |
getResources(String classpathEntryPath,
Pattern searchPattern,
boolean cachedJar)
Search all files that match the given Regex pattern.
|
private static List<String> |
getResourcesFromDirectory(File directory,
Pattern searchPattern)
Browse a directory to search resources that match the pattern.
|
private static List<String> |
getResourcesFromJarOrZipFile(File jarOrZipFile,
Pattern searchPattern)
Browse the jar content to search resources that match the pattern.
|
private static boolean |
hasJavaWebstartLibrary()
Check that javaws.jar is accessible.
|
static InputStream |
loadInputStream(String custConfFileName)
TRy to load a custom resource file.
|
public static final String SEPARATOR
private static final JRLogger LOGGER
private static final String CLASSPATH
private static final String CLASSPATH_SEPARATOR
public static Collection<String> getClasspathResources(Pattern searchPattern)
searchPattern - the pattern used to filter all matching filesprivate static boolean hasJavaWebstartLibrary()
private static List<String> getResources(String classpathEntryPath, Pattern searchPattern, boolean cachedJar)
classpathEntryPath - the root folder used for searchsearchPattern - the regex pattern used as a filtercachedJar - is a jar cached by Java Webstart without any extensionprivate static List<String> getResourcesFromDirectory(File directory, Pattern searchPattern)
directory - the root directory to browsesearchPattern - the regex pattern used as a filterprivate static List<String> getResourcesFromJarOrZipFile(File jarOrZipFile, Pattern searchPattern)
jarOrZipFile - the jar to exploresearchPattern - the regex pattern used as a filterprivate static void checkResource(List<String> resources, Pattern searchPattern, String resourceName)
resources - the list of found resourcessearchPattern - the regex patternresourceName - the resource to check and to addpublic static InputStream loadInputStream(String custConfFileName)
custConfFileName - the custom resource file to loadCopyright © 2011–2014 JRebirth OSS. All rights reserved.