Package java.lang Previous
Previous
Java API
Java API
Index
Index
Next
Next

Class Compiler

Methods

public  final  class  java.lang.Compiler
    extends  java.lang.Object  
{
        // Methods
    public static Object command(Object  any);	
    public static boolean compileClass(Class  clazz);	
    public static boolean compileClasses(String  string);	
    public static void disable();	
    public static void enable();	
}

The Compiler class is provided in support of Java-to-native-code compilers and related services.

When the Java Virtual Machine first starts, it determines if a system property java.compiler exists. If so, it is assumed to be the name of a library (whose exact location and type is platform-dependent); the loadLibrary method in class System is called to load that library. If this loading succeeds, the function named java_lang_Compiler_start() in that library is called.

If there is no compiler available, these methods do nothing.


Methods


command

public static Object command(Object  any) 

The Compiler should examine the argument type and its fields and perform some documented operation. No specific operations are required.

Return Value:

Returns a compiler-specific value, or null if no compiler is available.

ParameterDescription
any an argument


compileClass

public static boolean compileClass(Class  clazz) 

The indicated class is compiled.

Return Value:

Returns true if the compilation succeeded; false if the compilation failed or no compiler is available.

ParameterDescription
clazz a class


compileClasses

public static boolean compileClasses(String  string) 

Indicates that the application would like the third-party software to compile all classes whose name matches the indicated string.

Return Value:

Returns true if the compilation succeeded; false if the compilation failed or no compiler is available.

ParameterDescription
string the name of the classes to compile


disable

public static void disable() 

Cause the Compiler to cease operation.


enable

public static void enable() 

Cause the Compiler to resume operation.



Top© 1996 Sun Microsystems, Inc. All rights reserved.