/[classpath]/classpath/java/lang/Compiler.java
ViewVC logotype

Diff of /classpath/java/lang/Compiler.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mark, Tue Jan 22 22:26:59 2002 UTC revision 1.6 by ericb, Wed Mar 20 20:04:32 2002 UTC
# Line 1  Line 1 
1  /* Compiler.java -- Interface for implementing a method to override  /* Compiler.java -- placeholder for Java-to-native runtime compilers
2     Object.clone()comparaing objects to obtain an ordering     Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
    Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.  
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 8  GNU Classpath is free software; you can Line 7  GNU Classpath is free software; you can
7  it under the terms of the GNU General Public License as published by  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)  the Free Software Foundation; either version 2, or (at your option)
9  any later version.  any later version.
10    
11  GNU Classpath is distributed in the hope that it will be useful, but  GNU Classpath is distributed in the hope that it will be useful, but
12  WITHOUT ANY WARRANTY; without even the implied warranty of  WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Line 39  exception statement from your version. * Line 38  exception statement from your version. *
38    
39  package java.lang;  package java.lang;
40    
 /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3  
  */  
   
41  /**  /**
42   * The <code>Compiler</code> class is a place holder for a JIT   * The <code>Compiler</code> class is a placeholder for a JIT compiler
43   * compiler implementation does nothing unless there is such a   * implementation, and does nothing unless there is such a compiler.
44   * compiler by default.   *
45   * <p>   * <p>The system property <code>java.compiler</code> may contain the name
  * The system property <code>java.compiler</code> may contain the name  
46   * of a library to load with <code>System.loadLibrary</code> when the   * of a library to load with <code>System.loadLibrary</code> when the
47   * virtual machine first starts.  If so and loading the library succeeds,   * virtual machine first starts.  If so, and loading the library succeeds,
48   * then a function by the name of <code>java_lang_Compiler_start()</code>   * then a function by the name of <code>java_lang_Compiler_start()</code>
49   * in that library is called.   * in that library is called.
50   *   *
51   * Note that a VM might not have implemented any of this.   * <p>Note that a VM might not have implemented any of this.
52   *   *
53   * @author Tom Tromey <tromey@cygnus.com>   * @author Tom Tromey <tromey@cygnus.com>
54   *   * @see System#getProperty(String)
55     * @see System#getProperty(String, String)
56     * @see System#loadLibrary(String)
57   * @since JDK 1.0   * @since JDK 1.0
58   * @see System#getProperty(java.lang.String)   * @status updated to 1.4
  * @see System#getProperty(java.lang.String,java.lang.String)  
  * @see System#loadLibrary(java.lang.String)  
59   */   */
60  public final class Compiler  public final class Compiler
61  {  {
62      /**    /**
63       * Don't allow new `Compiler's to be made.     * Don't allow new `Compiler's to be made.
64       */     */
65      private Compiler ()    private Compiler()
66      {    {
67      }    }
68    
69      /**    /**
70       * Compile the class named by <code>oneClass</code>.     * Compile the class named by <code>oneClass</code>.
71       *     *
72       * @param oneClass the class to compile     * @param oneClass the class to compile
73       * @return <code>false</code> if no compiler is available or     * @return <code>false</code> if no compiler is available or
74       * compilation failed and <code>true</code> if compilation succeeded.     *         compilation failed, <code>true</code> if compilation succeeded
75       */     * @throws NullPointerException if oneClass is null
76      public static boolean compileClass (Class oneClass)     */
77      {    public static boolean compileClass(Class oneClass)
78          // Never succeed.    {
79          return false;      // Never succeed.
80      }      return false;
81          }
82      /**  
83       * Compile the classes whose name matches <code>classNames/code>.    /**
84       *     * Compile the classes whose name matches <code>classNames/code>.
85       * @param classNames the name of classes to compile     *
86       * @return <code>false</code> if no compiler is available or     * @param classNames the name of classes to compile
87       * compilation failed and <code>true</code> if compilation succeeded.     * @return <code>false</code> if no compiler is available or
88       */     *         compilation failed, <code>true</code> if compilation succeeded
89      public static boolean compileClasses (String classNames)     * @throws NullPointerException if classNames is null
90      {     */
91          // Note the incredibly lame interface.  Always fail.    public static boolean compileClasses(String classNames)
92          return false;    {
93      }      // Note the incredibly lame interface.  Always fail.
94        return false;
95      /**    }
96       * This method examines the argument and performs an operation  
97       * according to the compilers documentation.  No specific operation    /**
98       * is required.     * This method examines the argument and performs an operation
99       */     * according to the compilers documentation.  No specific operation
100      public static Object command (Object arg)     * is required.
101      {     *
102          // Our implementation defines this to a no-op.     * @param arg a compiler-specific argument
103          return null;     * @return a compiler-specific value, including null
104      }     * @throws NullPointerException if the compiler doesn't like a null arg
105       */
106      /**    public static Object command(Object arg)
107       * Calling <code>Compiler.enable()</code> will cause the compiler    {
108       * to resume operation if it was previously disabled.        // Our implementation defines this to a no-op.
109       */      return null;
110      public static void enable () { }    }
111    
112      /**    /**
113       * Calling <code>Compiler.disable()</code> will cause the compiler     * Calling <code>Compiler.enable()</code> will cause the compiler
114       * to be suspended.     * to resume operation if it was previously disabled; provided that a
115       */     * compiler even exists.
116      public static void disable () { }     */
117      public static void enable()
118      {
119      }
120    
121      /**
122       * Calling <code>Compiler.disable()</code> will cause the compiler
123       * to be suspended; provided that a compiler even exists.
124       */
125      public static void disable()
126      {
127      }
128  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26