package org.graalvm.compiler.replacements;
import java.util.*;
import org.graalvm.compiler.options.*;
public class SnippetTemplate_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "MaxTemplatesPerSnippet": {
return OptionDescriptor.create(
"MaxTemplatesPerSnippet",
Integer.class,
"",
SnippetTemplate.Options.class,
"MaxTemplatesPerSnippet",
SnippetTemplate.Options.MaxTemplatesPerSnippet);
}
case "UseSnippetTemplateCache": {
return OptionDescriptor.create(
"UseSnippetTemplateCache",
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();
}
};
}
}