com.borland.primetime
Class PrimeTime

java.lang.Object
  |
  +--com.borland.primetime.PrimeTime

public class PrimeTime
extends java.lang.Object

The PrimeTime class serves as a starting point for applications constructed with the PrimeTime framework. Virtually no initialization is performed by this class, instead it explores the classpath defined for the VM and locates designated classes referred to collectively as "OpenTools." These classes are responsible for configuring the PrimeTime framework at runtime using a variety of registration methods.

The OpenTools classes are located by reading the manifest file for each entry on the classpath and looking for entries of the following form:

 OpenTools-Core:
  com.borland.primetime.vfs.NewFilesystem
  com.borland.primetime.vfs.FileFilesystem
  com.borland.primetime.vfs.ZipFilesystem
 

Note that "Core" can be replaced by any case-sensitive OpenTools category name, that the class names that follow must be fully-qualified OpenTools classes and that the multi-line format shown below is legal only if each line but the last includes a trailing space.

For convenience during development, each classpath entry may also have an override file associated with it. These have the same format as manifest files and are found by appending ".opentools" to the path entry. For example, PrimeTime would scan "c:\classes.opentools" for the classpath entry "c:\classes" and "c:\classes.zip.opentools" for the entry "c:\classes.zip"

Each OpenTool class must declare an initialization method as follows:

 public static void initOpenTool(byte majorVersion, byte minorVersion) {
   if (majorVersion != 4)
     return;

   // Initialize OpenTool here...
 }
 

The version numbers passed may be used to assist in deciding which features of the OpenTools API can be safely used:


Field Summary
static byte CURRENT_MAJOR_VERSION
          The major version value for this release of JBuilder.
static byte CURRENT_MINOR_VERSION
          The minor version value for this release of JBuilder.
 
Method Summary
static java.lang.String[] getInitializedOpenTools()
          Returns the list of OpenTools that have been initialized in this PrimeTime session.
static void initializeOpenTools(java.lang.String category)
          Initializes all OpenTools in a specified category.
static boolean isVerbose()
          Returns whether or not the -verbose command line option is present.
static void registerCommand(java.lang.String option, Command command)
          Registers a command handler for a particular command line option.
static void start(java.lang.String category, java.lang.String[] args)
          Initializes all OpenTools in the specified category and parses the PrimeTime command line arguments via invokeCommands.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURRENT_MAJOR_VERSION

public static final byte CURRENT_MAJOR_VERSION
The major version value for this release of JBuilder.

CURRENT_MINOR_VERSION

public static final byte CURRENT_MINOR_VERSION
The minor version value for this release of JBuilder.
Method Detail

start

public static void start(java.lang.String category,
                         java.lang.String[] args)
Initializes all OpenTools in the specified category and parses the PrimeTime command line arguments via invokeCommands.
Parameters:
category - The OpenTool category to initialize.
args - An array of Strings representing command line arguments.

isVerbose

public static boolean isVerbose()
Returns whether or not the -verbose command line option is present.
Returns:
Returns true if verbose output during OpenTools initialization is requested.

registerCommand

public static void registerCommand(java.lang.String option,
                                   Command command)
Registers a command handler for a particular command line option. Any handlers must be registered by "Core" OpenTools classes in order to be loaded before the command line is parsed.
Parameters:
option - The case-sensitive option that invokes the associated command. This value must not include the leading hyphen. A null value is used to register the "default" command as described under invokeCommands.
command - The com.borland.primetime.Command to be associated with the option. A null value indicates that the associated option should be removed from the command registry.

initializeOpenTools

public static void initializeOpenTools(java.lang.String category)
Initializes all OpenTools in a specified category. The initialization will occur in the order that the registrants appear on the classpath. Within a single path entry OpenTools will be initialized in the order they appear in the manifest's OpenTools description.
Parameters:
category - The OpenTool category to initialize.

getInitializedOpenTools

public static java.lang.String[] getInitializedOpenTools()
Returns the list of OpenTools that have been initialized in this PrimeTime session.
Returns:
A String array of initialized OpenTool class names.