< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java

Print this page
rev 12121 : 8167180: [JVMCI] Exported elements referring to inaccessible types in jdk.vm.ci

*** 18,83 **** * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! package jdk.vm.ci.runtime.services; import java.io.PrintStream; - import jdk.vm.ci.runtime.JVMCICompiler; - import jdk.vm.ci.runtime.JVMCIRuntime; - import jdk.vm.ci.services.JVMCIPermission; - /** ! * Service-provider class for creating JVMCI compilers. */ ! public abstract class JVMCICompilerFactory { ! ! private static Void checkPermission() { ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) { ! sm.checkPermission(new JVMCIPermission()); ! } ! return null; ! } ! ! @SuppressWarnings("unused") ! private JVMCICompilerFactory(Void ignore) { ! } ! ! /** ! * Initializes a new instance of this class. ! * ! * @throws SecurityException if a security manager has been installed and it denies ! * {@link JVMCIPermission} ! */ ! protected JVMCICompilerFactory() { ! this(checkPermission()); ! } /** * Get the name of this compiler. The name is used by JVMCI to determine which factory to use. */ ! public abstract String getCompilerName(); /** * Notifies this object that it has been selected to {@linkplain #createCompiler(JVMCIRuntime) * create} a compiler and it should now perform any heavy weight initialization that it deferred * during construction. */ ! public void onSelection() { } /** * Create a new instance of a {@link JVMCICompiler}. */ ! public abstract JVMCICompiler createCompiler(JVMCIRuntime runtime); /** * Prints a description of the properties used to configure this compiler. * * @param out where to print the message */ ! public void printProperties(PrintStream out) { } } --- 18,57 ---- * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! package jdk.vm.ci.runtime; import java.io.PrintStream; /** ! * Factory for creating JVMCI compilers. */ ! public interface JVMCICompilerFactory { /** * Get the name of this compiler. The name is used by JVMCI to determine which factory to use. */ ! String getCompilerName(); /** * Notifies this object that it has been selected to {@linkplain #createCompiler(JVMCIRuntime) * create} a compiler and it should now perform any heavy weight initialization that it deferred * during construction. */ ! default void onSelection() { } /** * Create a new instance of a {@link JVMCICompiler}. */ ! JVMCICompiler createCompiler(JVMCIRuntime runtime); /** * Prints a description of the properties used to configure this compiler. * * @param out where to print the message */ ! default void printProperties(PrintStream out) { } }
< prev index next >