package org.graalvm.compiler.hotspot;
import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
public class CompilerConfigurationFactory_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "CompilerConfiguration": {
return OptionDescriptor.create(
"CompilerConfiguration",
OptionType.Expert,
String.class,
"Names the Graal compiler configuration to use. If ommitted, the compiler configuration with the highest auto-selection priority is used. To see the set of available configurations, supply the value 'help' to this option.",
CompilerConfigurationFactory.Options.class,
"CompilerConfiguration",
CompilerConfigurationFactory.Options.CompilerConfiguration);
}
case "ShowConfiguration": {
return OptionDescriptor.create(
"ShowConfiguration",
OptionType.User,
org.graalvm.compiler.hotspot.CompilerConfigurationFactory.ShowConfigurationLevel.class,
"Writes to the VM log information about the Graal compiler configuration selected.",
CompilerConfigurationFactory.Options.class,
"ShowConfiguration",
CompilerConfigurationFactory.Options.ShowConfiguration);
}
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 2;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("CompilerConfiguration");
case 1: return get("ShowConfiguration");
}
throw new NoSuchElementException();
}
};
}
}