|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ecyrd.jspwiki.util.ClassUtil
public final class ClassUtil
Contains useful utilities for class file manipulation. This is a static class, so there is no need to instantiate it.
| Field Summary | |
|---|---|
static String |
MAPPINGS
The location of the classmappings.xml document. |
| Method Summary | |
|---|---|
static Class |
findClass(List packages,
String className)
Attempts to find a class from a collection of packages. |
static Class |
findClass(String packageName,
String className)
A shortcut for findClass when you only have a singular package to search. |
static Object |
getMappedObject(String requestedClass)
This method is used to locate and instantiate a mapped class. |
static Object |
getMappedObject(String requestedClass,
Object arg1)
This method is used to locate and instantiate a mapped class. |
static Object |
getMappedObject(String requestedClass,
Object[] initargs)
This method is used to locate and instantiate a mapped class. |
static Object |
getMappedObject(String requestedClass,
Object arg1,
Object arg2)
This method is used to locate and instantiate a mapped class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MAPPINGS
| Method Detail |
|---|
public static Class findClass(List packages,
String className)
throws ClassNotFoundException
packages - A List of Strings, containing different package names.className - The name of the class to find.
ClassNotFoundException - if this particular class cannot be found
from the list.
public static Class findClass(String packageName,
String className)
throws ClassNotFoundException
packageName - A package name (such as "com.ecyrd.jspwiki.plugins").className - The class name to find.
ClassNotFoundException - if this particular class cannot be found.
public static Object getMappedObject(String requestedClass)
throws WikiException
ClassUtil.MAPPINGS ("/ini/classmappings.xml").
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 "/ini/classmappings.xml" file to see
how this method works.
requestedClass - The name of the class you wish to instantiate.
WikiException - If the class cannot be found or instantiated.
public static Object getMappedObject(String requestedClass,
Object arg1)
throws WikiException
ClassUtil.MAPPINGS ("/ini/classmappings.xml").
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 "/ini/classmappings.xml" file to see
how this method works.
requestedClass - The name of the class you wish to instantiate.arg1 - Argument for the constructor.
WikiException - If the class cannot be found or instantiated.
public static Object getMappedObject(String requestedClass,
Object arg1,
Object arg2)
throws WikiException
ClassUtil.MAPPINGS ("/ini/classmappings.xml").
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 "/ini/classmappings.xml" file to see
how this method works.
requestedClass - The name of the class you wish to instantiate.arg1 - Argument for the constructorarg2 - A second argument for the constructor
WikiException - If the class cannot be found or instantiated.
public static Object getMappedObject(String requestedClass,
Object[] initargs)
throws WikiException
"/ini/classmappings.xml".
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 "/ini/classmappings.xml" 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.
requestedClass - The name of the class you wish to instantiate.initargs - The parameters to be passed to the constructor. May be null.
WikiException - If the class cannot be found or instantiated. The error is logged.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||