Package java.lang |
![]() Previous |
![]() Java API |
![]() Index |
![]() Next |
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.
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.
Parameter Description any an argument
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.
Parameter Description clazz a class
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.
Parameter Description string the name of the classes to compile
public static void disable()Cause the Compiler to cease operation.
public static void enable()Cause the Compiler to resume operation.