Package org.xj3d.ui.construct
Class ClassLoadUtilities
java.lang.Object
org.xj3d.ui.construct.ClassLoadUtilities
Utility methods for loading classes.
- Version:
- $Revision: 1.2 $
- Author:
- Rex Melton
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.j3d.util.ErrorReporterThe error reporting mechanism -
Constructor Summary
ConstructorsConstructorDescriptionConstructorClassLoadUtilities(org.j3d.util.ErrorReporter reporter) Constructor -
Method Summary
Modifier and TypeMethodDescriptionLoad a class instance constructed from the default constructor.Load a class instance constructed with the argument parameters.protected ScriptEngineloadScriptEngine(String classname, BrowserCore core, ViewpointManager viewpointManager, RouteManager routeManager, FrameStateManager stateManager, WorldLoaderManager worldLoader, boolean required) Load a script engine.
-
Field Details
-
errorReporter
protected org.j3d.util.ErrorReporter errorReporterThe error reporting mechanism
-
-
Constructor Details
-
ClassLoadUtilities
public ClassLoadUtilities()Constructor -
ClassLoadUtilities
public ClassLoadUtilities(org.j3d.util.ErrorReporter reporter) Constructor- Parameters:
reporter- The error reporter
-
-
Method Details
-
loadClass
Load a class instance constructed from the default constructor.- Parameters:
classname- The fully qualified name of the class to loadrequired- Is this class required for operation, If true - an exception will be thrown if the class fails to load for any reason. If false - an error report will be generated if the class fails to load, but execution will continue and a null will be returned.- Returns:
- The class instance.
- Throws:
InvalidConfigurationException- If the required flag is true and the class cannot be loaded.
-
loadClass
public Object loadClass(String classname, Object[] constParams, Class[] paramTypes, boolean required) Load a class instance constructed with the argument parameters.- Parameters:
classname- The fully qualified name of the class to load.constParams- The array of parameters to pass to the Class's constructor.paramTypes- The array of class objects, matching the constParams argument that are used to select the appropriate Class constructor.required- Is this class required for operation. If true - an exception will be thrown if the class fails to load for any reason. If false - an error report will be generated if the class fails to load, but execution will continue and a null will be returned.- Returns:
- The class instance.
-
loadScriptEngine
protected ScriptEngine loadScriptEngine(String classname, BrowserCore core, ViewpointManager viewpointManager, RouteManager routeManager, FrameStateManager stateManager, WorldLoaderManager worldLoader, boolean required) Load a script engine.- Parameters:
classname- The fully qualified name of the script engine class to loadcore- The browser coreviewpointManager- TherouteManager- The route managerstateManager- The frame state managerworldLoader- The manager of the world loadersrequired- Is this class required for operation. If true - an exception will be thrown if the class fails to load for any reason. If false - an error report will be generated if the class fails to load, but execution will continue and a null will be returned.- Returns:
- The script engine instance.
- Throws:
InvalidConfigurationException- If the required flag is true and the class cannot be loaded.
-