Overview | Package | Class | Tree | Deprecated | Index | Help
| J avolution v5.3 (J2SE 1.5+)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javolution.lang
Class ClassInitializer

    java.lang.Object
      javolution.lang.ClassInitializer

    public class ClassInitializer

extends java.lang.Object

This utility class allows for initialization of all classes at startup to avoid initialization delays at an innapropriate time.

Note: Users might want to disable logging when initializing run-time classes at start-up because of the presence of old classes (never used) in the jar files for which initialization fails. For example:``

         public static main(String[] args) {
             LogContext.enter(LogContext.NULL); // Temporarely disables logging errors and warnings.
             try {
                 ClassInitializer.initializeAll();  // Initializes bootstrap, extensions and classpath classes.
             } finally {
                 LogContext.exit(LogContext.NULL); // Goes back to default logging.
             }
             ...
         }

Version:
  3.6, November 6, 2005
Author:
  Jean-Marie Dautelle

Method Summary
`static void` | `initialize(java.lang.Class cls)` Initializes the specified class.
`static void` | `initialize(java.lang.String className)` Initializes the class with the specified name.
`static void` | `initializeAll()` Initializes all runtime and classpath classes.
`static void` | `initializeClassPath()` Initializes all classes in current classpath.
`static void` | `initializeDir(java.lang.String dirName)` Initializes all the classes in the specified directory.
`static void` | `initializeJar(java.lang.String jarName)` Initializes all the classes in the specified jar file.
`static void` | `initializeRuntime()` Initializes runtime classes (bootstrap classes in `System.getProperty("sun.boot.class.path"))` and the extension `.jar` in `lib/ext` directory).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### initializeAll

    public static void initializeAll()

  Initializes all runtime and classpath classes.

  See Also:
    `initializeRuntime()`, `initializeClassPath()`

### initializeRuntime

    public static void initializeRuntime()

  Initializes runtime classes (bootstrap classes in `System.getProperty("sun.boot.class.path"))` and the extension `.jar` in `lib/ext` directory).

### initializeClassPath

    public static void initializeClassPath()

  Initializes all classes in current classpath.

### initialize

    public static void initialize(java.lang.Class cls)

  Initializes the specified class.

  Parameters:
    `cls` - the class to initialize.

### initialize

    public static void initialize(java.lang.String className)

  Initializes the class with the specified name.

  Parameters:
    `className` - the name of the class to initialize.

### initializeJar

    public static void initializeJar(java.lang.String jarName)

  Initializes all the classes in the specified jar file.

  Parameters:
    `jarName` - the jar filename.

### initializeDir

    public static void initializeDir(java.lang.String dirName)

  Initializes all the classes in the specified directory.

  Parameters:
    `dirName` - the name of the directory containing the classes to initialize.

Overview | Package | Class | Tree | Deprecated | Index | Help
| J avolution v5.3 (J2SE 1.5+)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 - 2009 Javolution.