author | alanb |
Thu, 01 Dec 2016 08:57:53 +0000 | |
changeset 42338 | a60f280f803c |
parent 40802 | 48b3e92a50a8 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
40802 | 2 |
* Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package java.lang; |
|
27 |
||
28 |
/** |
|
29 |
* The {@code Compiler} class is provided to support Java-to-native-code |
|
30 |
* compilers and related services. By design, the {@code Compiler} class does |
|
31 |
* nothing; it serves as a placeholder for a JIT compiler implementation. |
|
40802 | 32 |
* If no compiler is available, these methods do nothing. |
2 | 33 |
* |
40802 | 34 |
* @deprecated JIT compilers and their technologies vary too widely to |
35 |
* be controlled effectively by a standardized interface. As such, many |
|
36 |
* JIT compiler implementations ignore this interface, and are instead |
|
37 |
* controllable by implementation-specific mechanisms such as command-line |
|
38 |
* options. This class is subject to removal in a future version of Java SE. |
|
2 | 39 |
* |
40 |
* @author Frank Yellin |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
5506
diff
changeset
|
41 |
* @since 1.0 |
2 | 42 |
*/ |
40802 | 43 |
@Deprecated(since="9", forRemoval=true) |
2 | 44 |
public final class Compiler { |
45 |
private Compiler() {} // don't make instances |
|
46 |
||
47 |
/** |
|
48 |
* Compiles the specified class. |
|
49 |
* |
|
50 |
* @param clazz |
|
51 |
* A class |
|
52 |
* |
|
53 |
* @return {@code true} if the compilation succeeded; {@code false} if the |
|
54 |
* compilation failed or no compiler is available |
|
55 |
* |
|
56 |
* @throws NullPointerException |
|
57 |
* If {@code clazz} is {@code null} |
|
58 |
*/ |
|
27184 | 59 |
public static boolean compileClass(Class<?> clazz) { |
60 |
return false; |
|
61 |
} |
|
2 | 62 |
|
63 |
/** |
|
64 |
* Compiles all classes whose name matches the specified string. |
|
65 |
* |
|
66 |
* @param string |
|
67 |
* The name of the classes to compile |
|
68 |
* |
|
69 |
* @return {@code true} if the compilation succeeded; {@code false} if the |
|
70 |
* compilation failed or no compiler is available |
|
71 |
* |
|
72 |
* @throws NullPointerException |
|
73 |
* If {@code string} is {@code null} |
|
74 |
*/ |
|
27184 | 75 |
public static boolean compileClasses(String string) { |
76 |
return false; |
|
77 |
} |
|
2 | 78 |
|
79 |
/** |
|
80 |
* Examines the argument type and its fields and perform some documented |
|
81 |
* operation. No specific operations are required. |
|
82 |
* |
|
83 |
* @param any |
|
84 |
* An argument |
|
85 |
* |
|
86 |
* @return A compiler-specific value, or {@code null} if no compiler is |
|
87 |
* available |
|
88 |
* |
|
89 |
* @throws NullPointerException |
|
90 |
* If {@code any} is {@code null} |
|
91 |
*/ |
|
27184 | 92 |
public static Object command(Object any) { |
93 |
return null; |
|
94 |
} |
|
2 | 95 |
|
96 |
/** |
|
97 |
* Cause the Compiler to resume operation. |
|
98 |
*/ |
|
27184 | 99 |
public static void enable() { } |
2 | 100 |
|
101 |
/** |
|
102 |
* Cause the Compiler to cease operation. |
|
103 |
*/ |
|
27184 | 104 |
public static void disable() { } |
2 | 105 |
} |