diff graal/com.oracle.jvmci.options/src/com/oracle/jvmci/options/OptionsLoader.java @ 21760:55058b8000ea

updated javadoc to document that JVMCI services are disjoint from the standard service loading mechanism and tightened generic type constraint such that Services and @ServiceProcessor can only be used with classes implementing Service
author Doug Simon <doug.simon@oracle.com>
date Sat, 06 Jun 2015 09:23:37 +0200
parents 93f282187d90
children
line wrap: on
line diff
--- a/graal/com.oracle.jvmci.options/src/com/oracle/jvmci/options/OptionsLoader.java	Fri Jun 05 23:54:02 2015 +0200
+++ b/graal/com.oracle.jvmci.options/src/com/oracle/jvmci/options/OptionsLoader.java	Sat Jun 06 09:23:37 2015 +0200
@@ -24,8 +24,6 @@
 
 import java.util.*;
 
-import com.oracle.jvmci.service.*;
-
 /**
  * Helper class used to load option descriptors. Only to be used in the slow-path.
  */
@@ -36,7 +34,7 @@
      * Initializes {@link #options} from {@link Options} services.
      */
     static {
-        for (Options opts : Services.load(Options.class)) {
+        for (Options opts : ServiceLoader.load(Options.class, OptionsLoader.class.getClassLoader())) {
             for (OptionDescriptor desc : opts) {
                 String name = desc.getName();
                 OptionDescriptor existing = options.put(name, desc);