| java.lang.Object com.ecyrd.jspwiki.util.ClassUtil
ClassUtil | final public class ClassUtil (Code) | | Contains useful utilities for class file manipulation. This is a static class,
so there is no need to instantiate it.
author: Janne Jalkanen since: 2.1.29. |
Field Summary | |
final public static String | MAPPINGS The location of the classmappings.xml document. |
Method Summary | |
public static Class | findClass(List packages, String className) Attempts to find a class from a collection of packages. | public static Class | findClass(String packageName, String className) A shortcut for findClass when you only have a singular package to search.
It will first attempt to instantiate the class directly from the className,
and will then try to prefix it with the packageName.
Parameters: packageName - A package name (such as "com.ecyrd.jspwiki.plugins"). Parameters: className - The class name to find. | public static Object | getMappedObject(String requestedClass) This method is used to locate and instantiate a mapped class.
You may redefine anything in the resource file which is located in your classpath
under the name ClassUtil.MAPPINGS (
) .
This is an extremely powerful system, which allows you to remap many of
the JSPWiki core classes to your own class. | public static Object | getMappedObject(String requestedClass, Object arg1) This method is used to locate and instantiate a mapped class.
You may redefine anything in the resource file which is located in your classpath
under the name ClassUtil.MAPPINGS (
) .
This is an extremely powerful system, which allows you to remap many of
the JSPWiki core classes to your own class. | public static Object | getMappedObject(String requestedClass, Object arg1, Object arg2) This method is used to locate and instantiate a mapped class.
You may redefine anything in the resource file which is located in your classpath
under the name ClassUtil.MAPPINGS (
) .
This is an extremely powerful system, which allows you to remap many of
the JSPWiki core classes to your own class. | public static Object | getMappedObject(String requestedClass, Object[] initargs) This method is used to locate and instantiate a mapped class.
You may redefine anything in the resource file which is located in your classpath
under the name
.
This is an extremely powerful system, which allows you to remap many of
the JSPWiki core classes to your own class. |
MAPPINGS | final public static String MAPPINGS(Code) | | The location of the classmappings.xml document. It will be searched for
in the classpath. It's value is "
".
|
findClass | public static Class findClass(List packages, String className) throws ClassNotFoundException(Code) | | Attempts to find a class from a collection of packages. This will first
attempt to find the class based on just the className parameter, but
should that fail, will iterate through the "packages" -list, prefixes
the package name to the className, and then tries to find the class
again.
Parameters: packages - A List of Strings, containing different package names. Parameters: className - The name of the class to find. The class, if it was found. throws: ClassNotFoundException - if this particular class cannot be foundfrom the list. |
findClass | public static Class findClass(String packageName, String className) throws ClassNotFoundException(Code) | | A shortcut for findClass when you only have a singular package to search.
It will first attempt to instantiate the class directly from the className,
and will then try to prefix it with the packageName.
Parameters: packageName - A package name (such as "com.ecyrd.jspwiki.plugins"). Parameters: className - The class name to find. The class, if it was found. throws: ClassNotFoundException - if this particular class cannot be found. |
getMappedObject | public static Object getMappedObject(String requestedClass) throws WikiException(Code) | | This method is used to locate and instantiate a mapped class.
You may redefine anything in the resource file which is located in your classpath
under the name ClassUtil.MAPPINGS (
) .
This is an extremely powerful system, which allows you to remap many of
the JSPWiki core classes to your own class. Please read the documentation
included in the default
file to see
how this method works.
Parameters: requestedClass - The name of the class you wish to instantiate. An instantiated Object. throws: WikiException - If the class cannot be found or instantiated. since: 2.5.40 |
getMappedObject | public static Object getMappedObject(String requestedClass, Object arg1) throws WikiException(Code) | | This method is used to locate and instantiate a mapped class.
You may redefine anything in the resource file which is located in your classpath
under the name ClassUtil.MAPPINGS (
) .
This is an extremely powerful system, which allows you to remap many of
the JSPWiki core classes to your own class. Please read the documentation
included in the default
file to see
how this method works.
Parameters: requestedClass - The name of the class you wish to instantiate. Parameters: arg1 - Argument for the constructor. An instantiated Object. throws: WikiException - If the class cannot be found or instantiated. since: 2.5.40 |
getMappedObject | public static Object getMappedObject(String requestedClass, Object arg1, Object arg2) throws WikiException(Code) | | This method is used to locate and instantiate a mapped class.
You may redefine anything in the resource file which is located in your classpath
under the name ClassUtil.MAPPINGS (
) .
This is an extremely powerful system, which allows you to remap many of
the JSPWiki core classes to your own class. Please read the documentation
included in the default
file to see
how this method works.
Parameters: requestedClass - The name of the class you wish to instantiate. Parameters: arg1 - Argument for the constructor Parameters: arg2 - A second argument for the constructor An instantiated Object. throws: WikiException - If the class cannot be found or instantiated. since: 2.5.40 |
getMappedObject | public static Object getMappedObject(String requestedClass, Object[] initargs) throws WikiException(Code) | | This method is used to locate and instantiate a mapped class.
You may redefine anything in the resource file which is located in your classpath
under the name
.
This is an extremely powerful system, which allows you to remap many of
the JSPWiki core classes to your own class. Please read the documentation
included in the default
file to see
how this method works.
This method takes in an object array for the constructor arguments for classes
which have more than two constructors.
Parameters: requestedClass - The name of the class you wish to instantiate. Parameters: initargs - The parameters to be passed to the constructor. May be null . An instantiated Object. throws: WikiException - If the class cannot be found or instantiated. The error is logged. since: 2.5.40 |
|
|