Java.lang.Compiler Class


Advertisements

Introduction

The java.lang.Compiler class is provided to support Java-to-native-code compilers and related services. By design, it serves as a placeholder for a JIT compiler implementation.

Class Declaration

Following is the declaration for java.lang.Compiler class −

public final class Compiler
   extends Object

Class methods

Sr.No. Method & Description
1 static Object command(Object any)

This method examines the argument type and its fields and perform some documented operation.

2 static boolean compileClass(Class<?> clazz)

This method compiles the specified class.

3 static void disable()

This method causes the Compiler to cease operation.

4 static boolean compileClasses(String string)

This method compiles all classes whose name matches the specified string..

5 static void enable()

This method cause the Compiler to resume operation.

Methods inherited

This class inherits methods from the following classes −

  • java.lang.Object
Advertisements