java.lang.Compiler Maven / Gradle / Ivy
/*
This is not an official specification document, and usage is restricted.
NOTICE
(c) 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
Neither this file nor any files generated from it describe a complete
specification, and they may only be used as described below. For
example, no permission is given for you to incorporate this file, in
whole or in part, in an implementation of a Java specification.
Sun Microsystems Inc. owns the copyright in this file and it is provided
to you for informative, as opposed to normative, use. The file and any
files generated from it may be used to generate other informative
documentation, such as a unified set of documents of API signatures for
a platform that includes technologies expressed as Java APIs. The file
may also be used to produce "compilation stubs," which allow
applications to be compiled and validated for such platforms.
Any work generated from this file, such as unified javadocs or compiled
stub files, must be accompanied by this notice in its entirety.
This work corresponds to the API signatures of JSR 219: Foundation
Profile 1.1. In the event of a discrepency between this work and the
JSR 219 specification, which is available at
http://www.jcp.org/en/jsr/detail?id=219, the latter takes precedence.
*/
package java.lang;
/**
* The Compiler
class is provided to support
* Java-to-native-code compilers and related services. By design, the
* Compiler
class does nothing; it serves as a
* placeholder for a JIT compiler implementation.
*
* When the Java Virtual Machine first starts, it determines if the
* system property java.compiler
exists. (System
* properties are accessible through getProperty
and,
* a method defined by the System
class.) If so, and the
* name isn't NONE or none, the internal JIT is enabled.
*
* If no compiler is available, these methods do nothing.
*
* @author Frank Yellin
* @version 1.17 10/17/00
* @see java.lang.System#getProperty(java.lang.String)
* @see java.lang.System#getProperty(java.lang.String, java.lang.String)
* @since JDK1.0
*/
public final class Compiler
{
/*
* This hidden constructor does not necessarily correspond to
* a constructor in the original source file -- it keeps javadoc
* from generating an inappropriate default constructor.
*/
private Compiler() { }
/**
* Compiles the specified class.
*
* @param clazz a class.
* @return true
if the compilation succeeded;
* false
if the compilation failed or no compiler
* is available.
* @exception NullPointerException if clazz
is
* null
.
*/
public static boolean compileClass(java.lang.Class clazz) {
return false;
}
/**
* Compiles all classes whose name matches the specified string.
*
* @param string the name of the classes to compile.
* @return true
if the compilation succeeded;
* false
if the compilation failed or no compiler
* is available.
* @exception NullPointerException if string
is
* null
.
*/
public static boolean compileClasses(java.lang.String string) {
return false;
}
/**
* Examines the argument type and its fields and perform some documented
* operation. No specific operations are required.
*
* @param any an argument.
* @return a compiler-specific value, or null
if no compiler
* is available.
* @exception NullPointerException if any
is
* null
.
*/
public static java.lang.Object command(java.lang.Object any) {
return null;
}
/**
* Cause the Compiler to resume operation. (This a noop on Solaris).
*/
public static void enable() { }
/**
* Cause the Compiler to cease operation. (This a noop on Solaris).
*/
public static void disable() { }
}