package org.graalvm.compiler.replacements;
import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
public class SnippetTemplate_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "MaxTemplatesPerSnippet": {
return OptionDescriptor.create(
"MaxTemplatesPerSnippet",
OptionType.Debug,
Integer.class,
"",
SnippetTemplate.Options.class,
"MaxTemplatesPerSnippet",
SnippetTemplate.Options.MaxTemplatesPerSnippet);
}
case "UseSnippetTemplateCache": {
return OptionDescriptor.create(
"UseSnippetTemplateCache",
OptionType.Debug,
Boolean.class,
"Use a LRU cache for snippet templates.",
SnippetTemplate.Options.class,
"UseSnippetTemplateCache",
SnippetTemplate.Options.UseSnippetTemplateCache);
}
}
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("MaxTemplatesPerSnippet");
case 1: return get("UseSnippetTemplateCache");
}
throw new NoSuchElementException();
}
};
}
}