source: trunk/src/gcc/libjava/java/lang/Compiler.java@ 1389

Last change on this file since 1389 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 4.2 KB
Line 
1/* Compiler.java -- Interface for implementing a method to override
2 Object.clone()comparaing objects to obtain an ordering
3 Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
4
5This file is part of GNU Classpath.
6
7GNU Classpath is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12GNU Classpath is distributed in the hope that it will be useful, but
13WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU Classpath; see the file COPYING. If not, write to the
19Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2002111-1307 USA.
21
22Linking this library statically or dynamically with other modules is
23making a combined work based on this library. Thus, the terms and
24conditions of the GNU General Public License cover the whole
25combination.
26
27As a special exception, the copyright holders of this library give you
28permission to link this library with independent modules to produce an
29executable, regardless of the license terms of these independent
30modules, and to copy and distribute the resulting executable under
31terms of your choice, provided that you also meet, for each linked
32independent module, the terms and conditions of the license of that
33module. An independent module is a module which is not derived from
34or based on this library. If you modify this library, you may extend
35this exception to your version of the library, but you are not
36obligated to do so. If you do not wish to do so, delete this
37exception statement from your version. */
38
39
40package java.lang;
41
42/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
43 */
44
45/**
46 * The <code>Compiler</code> class is a place holder for a JIT
47 * compiler implementation does nothing unless there is such a
48 * compiler by default.
49 * <p>
50 * The system property <code>java.compiler</code> may contain the name
51 * of a library to load with <code>System.loadLibrary</code> when the
52 * virtual machine first starts. If so and loading the library succeeds,
53 * then a function by the name of <code>java_lang_Compiler_start()</code>
54 * in that library is called.
55 *
56 * Note that a VM might not have implemented any of this.
57 *
58 * @author Tom Tromey <[email protected]>
59 *
60 * @since JDK 1.0
61 * @see System#getProperty(java.lang.String)
62 * @see System#getProperty(java.lang.String,java.lang.String)
63 * @see System#loadLibrary(java.lang.String)
64 */
65public final class Compiler
66{
67 /**
68 * Don't allow new `Compiler's to be made.
69 */
70 private Compiler ()
71 {
72 }
73
74 /**
75 * Compile the class named by <code>oneClass</code>.
76 *
77 * @param oneClass the class to compile
78 * @return <code>false</code> if no compiler is available or
79 * compilation failed and <code>true</code> if compilation succeeded.
80 */
81 public static boolean compileClass (Class oneClass)
82 {
83 // Never succeed.
84 return false;
85 }
86
87 /**
88 * Compile the classes whose name matches <code>classNames/code>.
89 *
90 * @param classNames the name of classes to compile
91 * @return <code>false</code> if no compiler is available or
92 * compilation failed and <code>true</code> if compilation succeeded.
93 */
94 public static boolean compileClasses (String classNames)
95 {
96 // Note the incredibly lame interface. Always fail.
97 return false;
98 }
99
100 /**
101 * This method examines the argument and performs an operation
102 * according to the compilers documentation. No specific operation
103 * is required.
104 */
105 public static Object command (Object arg)
106 {
107 // Our implementation defines this to a no-op.
108 return null;
109 }
110
111 /**
112 * Calling <code>Compiler.enable()</code> will cause the compiler
113 * to resume operation if it was previously disabled.
114 */
115 public static void enable () { }
116
117 /**
118 * Calling <code>Compiler.disable()</code> will cause the compiler
119 * to be suspended.
120 */
121 public static void disable () { }
122}
Note: See TracBrowser for help on using the repository browser.