Xj3D 2.0 VRML/X3D Code API

org.xj3d.ui.construct
Class ClassLoadUtilities

java.lang.Object
  extended by org.xj3d.ui.construct.ClassLoadUtilities

public class ClassLoadUtilities
extends java.lang.Object

Utility methods for loading classes.

Version:
$Revision: 1.2 $
Author:
Rex Melton

Field Summary
protected  ErrorReporter errorReporter
          The error reporting mechanism
 
Constructor Summary
ClassLoadUtilities()
          Constructor
ClassLoadUtilities(ErrorReporter reporter)
          Constructor
 
Method Summary
 java.lang.Object loadClass(java.lang.String classname, boolean required)
          Load a class instance constructed from the default constructor.
 java.lang.Object loadClass(java.lang.String classname, java.lang.Object[] constParams, java.lang.Class[] paramTypes, boolean required)
          Load a class instance constructed with the argument parameters.
protected  ScriptEngine loadScriptEngine(java.lang.String classname, BrowserCore core, ViewpointManager viewpointManager, RouteManager routeManager, FrameStateManager stateManager, WorldLoaderManager worldLoader, boolean required)
          Load a script engine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorReporter

protected ErrorReporter errorReporter
The error reporting mechanism

Constructor Detail

ClassLoadUtilities

public ClassLoadUtilities()
Constructor


ClassLoadUtilities

public ClassLoadUtilities(ErrorReporter reporter)
Constructor

Parameters:
reporter - The error reporter
Method Detail

loadClass

public java.lang.Object loadClass(java.lang.String classname,
                                  boolean required)
Load a class instance constructed from the default constructor.

Parameters:
classname - The fully qualified name of the class to load
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.
Throws:
InvalidConfigurationException - If the required flag is true and the class cannot be loaded.

loadClass

public java.lang.Object loadClass(java.lang.String classname,
                                  java.lang.Object[] constParams,
                                  java.lang.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(java.lang.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 load
core - The browser core
viewpointManager - The
routeManager - The route manager
stateManager - The frame state manager
worldLoader - The manager of the world loaders
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 script engine instance.
Throws:
InvalidConfigurationException - If the required flag is true and the class cannot be loaded.

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium