public class SubstrateOptionsParser extends Object
OptionDescriptor
s.Modifier and Type | Class and Description |
---|---|
static class |
SubstrateOptionsParser.BooleanOptionFormat
Constants denoting supported boolean option formats.
|
Modifier and Type | Field and Description |
---|---|
static String |
HOSTED_OPTION_PREFIX |
static int |
PRINT_OPTION_INDENTATION |
static int |
PRINT_OPTION_WIDTH |
static int |
PRINT_OPTION_WRAP_WIDTH |
static String |
RUNTIME_OPTION_PREFIX |
Constructor and Description |
---|
SubstrateOptionsParser() |
Modifier and Type | Method and Description |
---|---|
static String |
commandArgument(org.graalvm.compiler.options.OptionKey<?> option,
String value)
Returns a string to be used on command line to set the option to a desirable value.
|
static String |
commandArgument(org.graalvm.compiler.options.OptionKey<?> option,
String value,
String apiOptionName)
Returns a string to be used on command line to set the option to a desirable value.
|
static double |
parseDouble(String v)
Parses the provide string to a double number, avoiding the JDK dependencies (which pull in a
lot of classes, including the regular expression library).
|
static boolean |
parseHostedOption(String optionPrefix,
org.graalvm.collections.EconomicMap<String,org.graalvm.compiler.options.OptionDescriptor> options,
org.graalvm.collections.EconomicMap<org.graalvm.compiler.options.OptionKey<?>,Object> valuesMap,
SubstrateOptionsParser.BooleanOptionFormat booleanOptionFormat,
Set<String> errors,
String arg,
PrintStream out)
Parses a option at image build time.
|
static long |
parseLong(String v) |
static void |
printOption(Consumer<String> println,
String option,
String description,
int indentation,
int optionWidth,
int wrapWidth) |
public static final String HOSTED_OPTION_PREFIX
public static final String RUNTIME_OPTION_PREFIX
public static final int PRINT_OPTION_INDENTATION
public static final int PRINT_OPTION_WIDTH
public static final int PRINT_OPTION_WRAP_WIDTH
public static boolean parseHostedOption(String optionPrefix, org.graalvm.collections.EconomicMap<String,org.graalvm.compiler.options.OptionDescriptor> options, org.graalvm.collections.EconomicMap<org.graalvm.compiler.options.OptionKey<?>,Object> valuesMap, SubstrateOptionsParser.BooleanOptionFormat booleanOptionFormat, Set<String> errors, String arg, PrintStream out)
optionPrefix
- prefix used before option nameoptions
- all possible optionsvaluesMap
- all current option valuesbooleanOptionFormat
- help expected for boolean optionserrors
- a set that contains all error messagesarg
- the argument currently processedarg.startsWith(optionPrefix)
public static void printOption(Consumer<String> println, String option, String description, int indentation, int optionWidth, int wrapWidth)
public static long parseLong(String v)
public static double parseDouble(String v)
public static String commandArgument(org.graalvm.compiler.options.OptionKey<?> option, String value)
APIOption
annotations, preference is given to a matching
APIOption
syntax.option
- for which the command line argument is createdpublic static String commandArgument(org.graalvm.compiler.options.OptionKey<?> option, String value, String apiOptionName)
APIOption
annotations, preference is given to a matching
APIOption
syntax.option
- for which the command line argument is createdapiOptionName
- name of the API option (in case there are multiple)