Class ArgumentProcessor

java.lang.Object
org.jruby.util.cli.ArgumentProcessor

public class ArgumentProcessor extends Object
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.
  • Field Details

  • Constructor Details

    • ArgumentProcessor

      public ArgumentProcessor(String[] arguments, RubyInstanceConfig config)
    • 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

      private boolean isInterpreterArgument(String argument)
    • getArgumentError

      private String getArgumentError(String additionalError)
    • processArgument

      private void processArgument()
    • enableDisableFeature

      private void enableDisableFeature(String name, boolean enable)
    • valueListFor

      private static String[] valueListFor(String argument, String key)
    • disallowedInRubyOpts

      private void disallowedInRubyOpts(CharSequence option)
    • errorMissingEquals

      private static void errorMissingEquals(String label)
    • processEncodingOption

      private void processEncodingOption(String value)
    • runBinScript

      private void runBinScript()
    • resolve

      private String resolve(String path, String scriptName)
    • resolveScript

      private String resolveScript(String scriptName)
    • resolveScriptUsingClassLoader

      @Deprecated public String resolveScriptUsingClassLoader(String scriptName)
      Deprecated.
    • grabValue

      private String grabValue(String errorMessage)
    • grabValue

      private String grabValue(String errorMessage, boolean usageError)
    • grabOptionalValue

      private String grabOptionalValue()
    • checkProperties

      private static void checkProperties()
    • isPropertySupported

      private static boolean isPropertySupported(String propertyName)