| |
|
| java.lang.Object com.anthonyeden.lib.util.ClassUtilities
ClassUtilities | public class ClassUtilities (Code) | | Useful class management utilities.
author: Anthony Eden author: Florin PATRASCU |
addClassesAndInterfaces | protected static void addClassesAndInterfaces(Class c, List classes)(Code) | | Add all super classes and interfaces of the given class to the given
List.
Parameters: c - The Class Parameters: classes - An List of Classes |
getAllClassesAndInterfaces | public static List getAllClassesAndInterfaces(Class startClass)(Code) | | Find all super classes and implemented interfaces for the given
class.
Parameters: startClass - The class A List of Class objects |
getResource | public static URL getResource(String name)(Code) | | Load the specified resource. This method will first attempt to load
the class using the context class loader. If that fails due to a
ClassNotFoundException or a SecurityException then the ClassUtilities
class loader is used.
Parameters: name - The resource name The resource URL or null |
getResource | public static URL getResource(String name, Object requestor)(Code) | | Load the specified resource. This method will first attempt to load
the class using the context class loader. If that fails due to a
ClassNotFoundException or a SecurityException then the requestor's
class loader is used. If the requestor object is null then the
ClassUtilities class loader is used.
Parameters: name - The resource name Parameters: requestor - The object requesting the resource or null The resource URL or null |
getResource | public static URL getResource(String name, Class requestor)(Code) | | Load the specified resource. This method will first attempt to load
the class using the context class loader. If that fails due to a
ClassNotFoundException or a SecurityException then the requestor's
class loader is used. If the requestor object is null then the
ClassUtilities class loader is used.
Parameters: name - The resource name Parameters: requestor - The class of the object requesting the resource or null The resource URL or null |
getResourceAsStream | public static InputStream getResourceAsStream(String name)(Code) | | Load the specified resource stream. This method will first attempt to
load the class using the context class loader. If that fails due to a
ClassNotFoundException or a SecurityException then ClassUtilities class
loader is used.
Parameters: name - The resource name The resource stream or null |
getResourceAsStream | public static InputStream getResourceAsStream(String name, Object requestor)(Code) | | Load the specified resource stream. This method will first attempt to
load the class using the context class loader. If that fails due to a
ClassNotFoundException or a SecurityException then the requestor's
class loader is used. If the requestor object is null then the
ClassUtilities class loader is used.
Parameters: name - The class name Parameters: requestor - The object requesting the resource or null The resource stream or null |
getResourceAsStream | public static InputStream getResourceAsStream(String name, Class requestor)(Code) | | Load the specified resource stream. This method will first attempt to
load the class using the context class loader. If that fails due to a
ClassNotFoundException or a SecurityException then the requestor's
class loader is used. If the requestor object is null then the
ClassUtilities class loader is used.
Parameters: name - The class name Parameters: requestor - The class of the object requesting the resource or null The resource stream or null |
loadClass | public static Class loadClass(String className) throws ClassNotFoundException(Code) | | Load the specified class name. This method will first attempt to load
the class using the context class loader. If that fails due to a
ClassNotFoundException or a SecurityException then the ClassUtilities
class loader is used.
Parameters: className - The class name The Class throws: ClassNotFoundException - |
loadClass | public static Class loadClass(String className, Object requestor) throws ClassNotFoundException(Code) | | Load the specified class name. This method will first attempt to load
the class using the context class loader. If that fails due to a
ClassNotFoundException or a SecurityException then the requestor's
class loader is used. If the requestor object is null then the
ClassUtilities class loader is used.
Parameters: className - The class name Parameters: requestor - The object requesting the class or null The Class throws: ClassNotFoundException - |
loadClass | public static Class loadClass(String className, Class requestor) throws ClassNotFoundException(Code) | | Load the specified class name. This method will first attempt to load
the class using the context class loader. If that fails due to a
ClassNotFoundException or a SecurityException then the requestor's
class loader is used. If the requestor object is null then the
ClassUtilities class loader is used.
Parameters: className - The class name Parameters: requestor - The class of the object requesting the class or null The Class throws: ClassNotFoundException - |
|
|
|