Package org.jruby.util.cli
Class ArgumentProcessor
java.lang.Object
org.jruby.util.cli.ArgumentProcessor
Encapsulated logic for processing JRuby's command-line arguments.
This class holds the processing logic for JRuby's non-JVM command-line arguments.
All standard Ruby options are processed here, as well as nonstandard JRuby-
specific options.
Options passed directly to the JVM are processed separately, by either a launch
script or by a native executable.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final List<ArgumentProcessor.Argument>private int(package private) final RubyInstanceConfigprivate booleanprivate static final Map<String,BiFunction<ArgumentProcessor, Boolean, Void>> private final booleanprivate final booleanstatic final Stringprivate static final Pattern -
Constructor Summary
ConstructorsConstructorDescriptionArgumentProcessor(String[] arguments, boolean processArgv, boolean dashed, boolean rubyOpts, RubyInstanceConfig config) ArgumentProcessor(String[] arguments, RubyInstanceConfig config) -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprivate voiddisallowedInRubyOpts(CharSequence option) private voidenableDisableFeature(String name, boolean enable) private static voiderrorMissingEquals(String label) private StringgetArgumentError(String additionalError) private Stringprivate Stringprivate Stringprivate booleanisInterpreterArgument(String argument) private static booleanisPropertySupported(String propertyName) private voidvoidvoidprocessArguments(boolean inline) private voidprivate voidprocessEncodingOption(String value) private Stringprivate StringresolveScript(String scriptName) resolveScriptUsingClassLoader(String scriptName) Deprecated.private voidprivate static String[]valueListFor(String argument, String key)
-
Field Details
-
SEPARATOR
- See Also:
-
arguments
-
argumentIndex
private int argumentIndex -
processArgv
private final boolean processArgv -
rubyOpts
private final boolean rubyOpts -
config
-
endOfArguments
private boolean endOfArguments -
characterIndex
private int characterIndex -
VERSION_FLAG
-
KNOWN_PROPERTIES
-
KNOWN_PROPERTY_PREFIXES
-
FEATURES
-
-
Constructor Details
-
ArgumentProcessor
-
ArgumentProcessor
public ArgumentProcessor(String[] arguments, boolean processArgv, boolean dashed, boolean rubyOpts, RubyInstanceConfig config)
-
-
Method Details
-
processArguments
public void processArguments() -
processArguments
public void processArguments(boolean inline) -
processArgv
private void processArgv() -
isInterpreterArgument
-
getArgumentError
-
processArgument
private void processArgument() -
enableDisableFeature
-
valueListFor
-
disallowedInRubyOpts
-
errorMissingEquals
-
processEncodingOption
-
runBinScript
private void runBinScript() -
resolve
-
resolveScript
-
resolveScriptUsingClassLoader
Deprecated. -
grabValue
-
grabValue
-
grabOptionalValue
-
checkProperties
private static void checkProperties() -
isPropertySupported
-