Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotOptions.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 | 5b9adb645217 |
comparison
equal
deleted
inserted
replaced
21759:75daca0c6a0f | 21760:55058b8000ea |
---|---|
23 package com.oracle.jvmci.hotspot; | 23 package com.oracle.jvmci.hotspot; |
24 | 24 |
25 import java.util.*; | 25 import java.util.*; |
26 | 26 |
27 import com.oracle.jvmci.options.*; | 27 import com.oracle.jvmci.options.*; |
28 import com.oracle.jvmci.service.*; | |
29 | 28 |
30 //JaCoCo Exclude | 29 //JaCoCo Exclude |
31 | 30 |
32 /** | 31 /** |
33 * Sets JVMCI options from the HotSpot command line. Such options are distinguished by the | 32 * Sets JVMCI options from the HotSpot command line. Such options are distinguished by the |
40 /** | 39 /** |
41 * Called from VM. | 40 * Called from VM. |
42 */ | 41 */ |
43 static void printFlags() { | 42 static void printFlags() { |
44 SortedMap<String, OptionDescriptor> options = new TreeMap<>(); | 43 SortedMap<String, OptionDescriptor> options = new TreeMap<>(); |
45 for (Options opts : Services.load(Options.class)) { | 44 |
45 for (Options opts : ServiceLoader.load(Options.class, HotSpotOptions.class.getClassLoader())) { | |
46 for (OptionDescriptor desc : opts) { | 46 for (OptionDescriptor desc : opts) { |
47 if (isHotSpotOption(desc)) { | 47 if (isHotSpotOption(desc)) { |
48 String name = desc.getName(); | 48 String name = desc.getName(); |
49 OptionDescriptor existing = options.put(name, desc); | 49 OptionDescriptor existing = options.put(name, desc); |
50 assert existing == null : "Option named \"" + name + "\" has multiple definitions: " + existing.getLocation() + " and " + desc.getLocation(); | 50 assert existing == null : "Option named \"" + name + "\" has multiple definitions: " + existing.getLocation() + " and " + desc.getLocation(); |