public class AgentClassLoader
extends java.lang.ClassLoader
This classloader doesn't do the security checks normally done by the default ClassLoaders. If path given is null, uses java.class.path.
Bootstrap
,
AgentImpl
,
org.safs.abbot.jvmagent.JVMAgent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_PATH_SEP
Default path separators for tokenizers: ":;"
|
protected static java.lang.String |
PSEP
convenient File.pathSeparator
|
Constructor and Description |
---|
AgentClassLoader(java.lang.String path)
Create a class loader that loads classes from the given search paths.
|
AgentClassLoader(java.lang.String path,
java.lang.ClassLoader parent)
Preferred constructor creates a class loader that loads classes from the
given search paths.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
convertPathToFilenames(java.lang.String path)
calls convertPathToFilenames(path, DEFAULT_PATH_SEP);
|
java.lang.String[] |
convertPathToFilenames(java.lang.String path,
java.lang.String seps)
Convert the given CLASSPATH type string into an array of unique filename paths.
|
java.io.File[] |
convertPathToFiles(java.lang.String path,
java.lang.String seps)
Convert the given CLASSPATH type string into an array of Files.
|
protected java.lang.Class |
findClass(java.lang.String name)
Overrides the superclass implementation.
|
static java.net.URL |
findCustomizedJARResource(java.net.URL url,
java.lang.String resource)
Assuming the URL represents a resource found in a JAR file, this routine
will attempt to return a URL pointing to a user customized resource file
of the given name located in the same directory containing the JAR file.
|
protected java.net.URL |
findResource(java.lang.String name)
Overrides the superclass implementation.
|
static java.io.File |
findResourceDirectory(java.net.URL url)
Attempts to locate the system directory where a file or resource
was successfully located.
|
protected java.lang.Class |
loadClass(java.lang.String name,
boolean resolve)
Cycle through the chain of parent ClassLoaders before resorting to ours.
|
static java.net.URL |
locateResource(java.lang.String resource)
Searches the following chain for a resource:
Thread.currentThread().getContextClassLoader().getResource(resource);
AgentClassLoader.class.getResource(resource);
ClassLoader.getSystemResource(resource);
|
java.lang.String |
toString() |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public static final java.lang.String DEFAULT_PATH_SEP
protected static final java.lang.String PSEP
public AgentClassLoader(java.lang.String path)
public AgentClassLoader(java.lang.String path, java.lang.ClassLoader parent)
protected java.lang.Class loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
protected java.lang.Class findClass(java.lang.String name) throws java.lang.ClassNotFoundException
findClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
protected java.net.URL findResource(java.lang.String name)
findResource
in class java.lang.ClassLoader
public java.lang.String[] convertPathToFilenames(java.lang.String path)
public java.io.File[] convertPathToFiles(java.lang.String path, java.lang.String seps)
public java.lang.String[] convertPathToFilenames(java.lang.String path, java.lang.String seps)
public java.lang.String toString()
toString
in class java.lang.Object
public static java.io.File findResourceDirectory(java.net.URL url)
resource
- URL to parse for directory information.public static java.net.URL findCustomizedJARResource(java.net.URL url, java.lang.String resource)
url
- of existing (JAR'd) resource.public static java.net.URL locateResource(java.lang.String resource) throws java.util.MissingResourceException
resource
- Name of resource to locate (Ex: "JavaObjectsMap.dat")java.util.MissingResourceException
- if resource (URL) cannot be found.Copyright © SAS Institute. All Rights Reserved.