All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----vlc.vrml.util.NodeCreator
The latest information and bugs in VermelGen can be found at http://www.vlc.com.au/VermelGen/
A static class that is used to create the appropriate node implementation for the type of application that is running. It uses the standard java.lang.Class calls to create new instances of classes that are required.
The problem that we have to solve is there are three versions of this application that could be run. In order to minimise versioning problems and distribution hassles (There are only two of us working on this thing!) that we do all the load and configuration at run time. If we placed all three sets of imports in the top of this file it means that the class loader ends up loading them all before doing anything with them. If the user does not have some of the librariues installed (eg EAI or Script) then the application will refuse to load with a ClassNotFound error - a major pain.
To get around this problem, this class uses Class.forName().newInstance(); to load the appropriate version of each of the dialogs. The string stays the same for each dialog type, just the right package name is then added to the front before the call.
All methods are static so that this can be called as needed.
public NodeCreator()
public static void setDetails(int appType, String codeBase)
public static VrmlObject create(int nodeType)
All Packages Class Hierarchy This Package Previous Next Index