com.sun.rtsjx
Class Compiler

java.lang.Object
  extended by com.sun.rtsjx.Compiler

public final class Compiler
extends java.lang.Object

The Compiler class is provided to support the Initialization Time Compilation (ITC) via application code. For a complete explanation of ITC, please refer to the Compilation Guide found in the Java RTS documentation.


Method Summary
static void mark(java.lang.ClassLoader loader, java.net.URL classList, java.net.URL methodList, boolean initialize)
          This method marks a set of methods that must be compiled at the time the class that declares them is initialized.
static void preinit(java.lang.ClassLoader loader, java.net.URL classList)
          This method triggers the pre-initialization of a set of classes specified via an URL.
static void preload(java.lang.ClassLoader loader, java.net.URL classList)
          This method triggers the pre-loading of a set of classes specified via an URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

preload

public static void preload(java.lang.ClassLoader loader,
                           java.net.URL classList)
This method triggers the pre-loading of a set of classes specified via an URL. The format of the class list found at the specified URL is the same as the format described in the Compilation Guide

Parameters:
classLoader - The class loader where the classes should be loaded. When this parameter is null, the default application class loader is used.
classList - A URL where to find the list of classes that must be pre-loaded
Throws:
java.lang.IllegalArgumentException - if the classList URL is invalid.

preinit

public static void preinit(java.lang.ClassLoader loader,
                           java.net.URL classList)
This method triggers the pre-initialization of a set of classes specified via an URL. The format of the class list found at the specified URL is the same as the format described in the Compilation Guide

Parameters:
classLoader - The class loader where the classes should be loaded. When this parameter is null, the default application class loader is used.
classList - A URL where to find the list of classes that must be preloaded
Throws:
java.lang.IllegalArgumentException - if the classList URL is invalid.

mark

public static void mark(java.lang.ClassLoader loader,
                        java.net.URL classList,
                        java.net.URL methodList,
                        boolean initialize)
This method marks a set of methods that must be compiled at the time the class that declares them is initialized. The set of methods is specified via a list found at the specified URL (methodList). The set of classes that is passed as a parameter is used to specify a set of classes that must be preloaded and/or pre-initialized for the compilation to produce jitter-free code. This set of classes may differ from the set of classes that contain a method listed in methodList. The format of the class and method lists found at the specified URLs are the same as the format described in the Compilation Guide If the boolean initialization parameter is true then the classes specified in the classList parameter are pre-initialized before the call to the mark method returns.

Parameters:
classLoader - The class loader where the classes should be loaded. When this parameter is null, the default application class loader is used.
classList - A URL where to find the class list
methodList - A URL where to find the list of method that must be marked.
initialize - Determines whether the set of classes in classList must be pre-initialized before the call to mark returns.
Throws:
java.lang.IllegalArgumentException - if the classList URL or the methodList URL are invalid.