Converts framework options into corresponding arguments (--platform, --version).

@param frameworks framework options

@return converted Pax Runner collection of arguments

@throws IllegalArgumentException - If there are more then one framework options
11071
private Collection<String> extractArguments( final FrameworkOption[] frameworks )
    {
        final List<String> arguments = new ArrayList<String>();
        if( frameworks.length > 1 )
        {
            throw new IllegalArgumentException( "Configuration cannot contain more then one platform" );
        }
        if( frameworks.length > 0 )
        {
            if( frameworks[ 0 ] instanceof CustomFrameworkOption )
            {
                String basePlatform = ( (CustomFrameworkOption) frameworks[ 0 ] ).getBasePlatform();
                if( basePlatform != null && basePlatform.trim().length() > 0 )
                {
                    arguments.add( "--platform=" + basePlatform );
                }
                arguments.add( "--definitionURL=" + ( (CustomFrameworkOption) frameworks[ 0 ] ).getDefinitionURL() );
            }
            else
            {
                arguments.add( "--platform=" + frameworks[ 0 ].getName() );
                final String version = frameworks[ 0 ].getVersion();
                if( version != null && version.trim().length() > 0 )
                {
                    arguments.add( "--version=" + version );
                }
            }
        }
        return arguments;
    }
334429
function FrameworkRouter(framework) {
  debug('create framework router');

  this.framework = framework;
  this.encoder = lodash.clone(http.encoder);
  this.decoder = lodash.clone(http.decoder);
}
1194508
public java.util.List<PlatformFramework> getFrameworks() {
        if (frameworks == null) {
            frameworks = new com.amazonaws.internal.SdkInternalList<PlatformFramework>();
        }
        return frameworks;
    }
177366
public static String[] processOptions(String args[])
    {
        String usageError;
        goodUsage: for (int i = 0; ; ++i) {
            if (i == args.length) {
                return new String[0];
            }
            String arg = args[i];
            if (!arg.startsWith("-")) {
                processStdin = false;
                fileList.add(arg);
                mainModule = arg;
                String[] result = new String[args.length - i - 1];
                System.arraycopy(args, i+1, result, 0, args.length - i - 1);
                return result;
            }
            if (arg.equals("-version")) {
                if (++i == args.length) {
                    usageError = arg;
                    break goodUsage;
                }
                int version;
                try {
                    version = Integer.parseInt(args[i]);
                } catch (NumberFormatException ex) {
                    usageError = args[i];
                    break goodUsage;
                }
                if (!Context.isValidLanguageVersion(version)) {
                    usageError = args[i];
                    break goodUsage;
                }
                shellContextFactory.setLanguageVersion(version);
                continue;
            }
            if (arg.equals("-opt") || arg.equals("-O")) {
                if (++i == args.length) {
                    usageError = arg;
                    break goodUsage;
                }
                int opt;
                try {
                    opt = Integer.parseInt(args[i]);
                } catch (NumberFormatException ex) {
                    usageError = args[i];
                    break goodUsage;
                }
                if (opt == -2) {
                    // Compatibility with Cocoon Rhino fork
                    opt = -1;
                } else if (!Context.isValidOptimizationLevel(opt)) {
                    usageError = args[i];
                    break goodUsage;
                }
                shellContextFactory.setOptimizationLevel(opt);
                continue;
            }
            if (arg.equals("-encoding")) {
                if (++i == args.length) {
                    usageError = arg;
                    break goodUsage;
                }
                String enc = args[i];
                shellContextFactory.setCharacterEncoding(enc);
                continue;
            }
            if (arg.equals("-strict")) {
                shellContextFactory.setStrictMode(true);
                shellContextFactory.setAllowReservedKeywords(false);
                errorReporter.setIsReportingWarnings(true);
                continue;
            }
            if (arg.equals("-fatal-warnings")) {
                shellContextFactory.setWarningAsError(true);
                continue;
            }
            if (arg.equals("-e")) {
                processStdin = false;
                if (++i == args.length) {
                    usageError = arg;
                    break goodUsage;
                }
                if (!global.initialized) {
                    global.init(shellContextFactory);
                }
                IProxy iproxy = new IProxy(IProxy.EVAL_INLINE_SCRIPT);
                iproxy.scriptText = args[i];
                shellContextFactory.call(iproxy);
                continue;
            }
            if (arg.equals("-require")) {
                useRequire = true;
                continue;
            }
            if (arg.equals("-sandbox")) {
                sandboxed = true;
                useRequire = true;
                continue;
            }
            if (arg.equals("-modules")) {
                if (++i == args.length) {
                    usageError = arg;
                    break goodUsage;
                }
                if (modulePath == null) {
                    modulePath = new ArrayList<String>();
                }
                modulePath.add(args[i]);
                useRequire = true;
                continue;
            }
            if (arg.equals("-w")) {
                errorReporter.setIsReportingWarnings(true);
                continue;
            }
            if (arg.equals("-f")) {
                processStdin = false;
                if (++i == args.length) {
                    usageError = arg;
                    break goodUsage;
                }
                if (args[i].equals("-")) {
                    fileList.add(null);
                } else {
                    fileList.add(args[i]);
                    mainModule = args[i];
                }
                continue;
            }
            if (arg.equals("-sealedlib")) {
                global.setSealedStdLib(true);
                continue;
            }
            if (arg.equals("-debug")) {
                shellContextFactory.setGeneratingDebug(true);
                continue;
            }
            if (arg.equals("-?") ||
                arg.equals("-help")) {
                // print usage message
                global.getOut().println(
                    ToolErrorReporter.getMessage("msg.shell.usage", Main.class.getName()));
                exitCode = 1;
                return null;
            }
            usageError = arg;
            break goodUsage;
        }
        // print error and usage message
        global.getOut().println(
            ToolErrorReporter.getMessage("msg.shell.invalid", usageError));
        global.getOut().println(
            ToolErrorReporter.getMessage("msg.shell.usage", Main.class.getName()));
        exitCode = 1;
        return null;
    }
501217
private void preRegisterMBeanServerPipelineService(final BundleContext systemContext) {
        PlatformMBeanServerBuilder.addPlatformMBeanServerBuilderListener(new PlatformMBeanServerBuilderListener() {
            @Override
            @FFDCIgnore(IllegalStateException.class)
            public void platformMBeanServerCreated(final MBeanServerPipeline pipeline) {
                if (pipeline != null) {
                    final Hashtable<String, String> svcProps = new Hashtable<String, String>();
                    try {
                        AccessController.doPrivileged(new PrivilegedAction<Void>() {
                            @Override
                            public Void run() {
                                systemContext.registerService(MBeanServerPipeline.class.getName(), pipeline, svcProps);
                                return null;
                            }
                        });
                    } catch (IllegalStateException ise) { /* This instance of the system bundle is no longer valid. Ignore it. */
                    }
                }
            }
        });
    }
303654
def frameworks_group
      current_group = groups.group('Frameworks').first
      current_group.instance_eval(&block) if block_given? and current_group
      current_group
    end
273773
def framework_find(fn, executable_path=None, env=None):
    
    try:
        return dyld_find(fn, executable_path=executable_path, env=env)
    except ValueError:
        pass
    fmwk_index = fn.rfind('.framework')
    if fmwk_index == -1:
        fmwk_index = len(fn)
        fn += '.framework'
    fn = os.path.join(fn, os.path.basename(fn[:fmwk_index]))
    return dyld_find(fn, executable_path=executable_path, env=env)
900597
public OvhApplication serviceName_frameworks_frameworkId_apps_GET(String serviceName, String frameworkId) throws IOException {
		String qPath = "/caas/containers/{serviceName}/frameworks/{frameworkId}/apps";
		StringBuilder sb = path(qPath, serviceName, frameworkId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhApplication.class);
	}
390788
public function setFramework($framework)
    {
        if (!is_string($framework)) {
            throw new \InvalidArgumentException('The attribute framework on the class Project has to be string (' . gettype($framework) . ('object' === gettype($framework) ? ' ' . get_class($framework) : '') . ' given).');
        }

        $this->framework = $framework;

        return $this;
    }
1083088
private V8Array convertArguments(Object[] args, Set<V8Value> newValues) {
		//create the array
		V8Array result = new V8Array(runtime);
		newValues.add(result);
		
		//convert the values
		for (int i = 0; i < args.length; ++i) {
			Object o = args[i];
			if (o == null) {
				result.push(V8Value.NULL);
			} else if (o instanceof JsonObject || o instanceof Collection ||
					o.getClass().isArray() || o instanceof Map) {
				V8Object v = runtime.executeObjectScript("(" +
						createJsonBuilder().toJson(o).toString() + ")");
				newValues.add(v);
				result.push(v);
			} else if (o instanceof String) {
				result.push((String)o);
			} else if (o instanceof Integer) {
				result.push((Integer)o);
			} else if (o instanceof Boolean) {
				result.push((Boolean)o);
			} else if (o instanceof Double) {
				result.push((Double)o);
			} else if (o instanceof ItemDataProvider) {
				o = new ItemDataProviderWrapper((ItemDataProvider)o);
				V8Object v8o = convertJavaObject(o);
				newValues.add(v8o);
				result.push(v8o);
			} else if (o instanceof AbbreviationProvider) {
				o = new AbbreviationProviderWrapper((AbbreviationProvider)o);
				V8Object v8o = convertJavaObject(o);
				newValues.add(v8o);
				result.push(v8o);
			} else if (o instanceof VariableWrapper) {
				o = new VariableWrapperWrapper((VariableWrapper)o);
				V8Object v8o = convertJavaObject(o);
				newValues.add(v8o);
				result.push(v8o);
			} else if (o instanceof V8ScriptRunner || o instanceof LocaleProvider) {
				V8Object v8o = convertJavaObject(o);
				newValues.add(v8o);
				result.push(v8o);
			} else if (o instanceof V8Value) {
				//already converted
				V8Value v = (V8Value)o;
				result.push(v);
			} else {
				throw new IllegalArgumentException("Unsupported argument: " +
						o.getClass());
			}
		}
		return result;
	}
190651
public static List<SupportedBrowser> toSupportedBrowsers(String[] browserNames) {
		List<SupportedBrowser> browsers = new ArrayList<>();
		for (String browserName : browserNames) {
			SupportedBrowser browser = SupportedBrowser.valueOf(browserName.toUpperCase());
			if(!browsers.contains(browser))
				browsers.add(browser);
		}
		return browsers;
	}
405354
def platform_applications(options = {})
      batches = Enumerator.new do |y|
        resp = @client.list_platform_applications(options)
        resp.each_page do |page|
          batch = []
          page.data.platform_applications.each do |p|
            batch << PlatformApplication.new(
              arn: p.platform_application_arn,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      PlatformApplication::Collection.new(batches)
    end
417106
public AbstractEndpointBuilder<T> applicationContext(ApplicationContext applicationContext) {
        if (getEndpoint() instanceof ApplicationContextAware) {
            ((ApplicationContextAware) getEndpoint()).setApplicationContext(applicationContext);
        }

        if (getEndpoint() instanceof BeanFactoryAware) {
            ((BeanFactoryAware) getEndpoint()).setBeanFactory(applicationContext);
        }

        return this;
    }
782826
protected Route getRouteStrategy(ControllerMethod controllerMethod, Parameter[] parameterNames) {
		return new FixedMethodStrategy(originalUri, controllerMethod, this.supportedMethods, builder.build(), priority, parameterNames);
	}
224184
@SuppressWarnings("static-method")
	protected BQRuntime createRuntime(String... args) {
		SARLStandaloneSetup.doPreSetup();
		final BQRuntime runtime = Bootique.app(args).autoLoadModules().createRuntime();
		SARLStandaloneSetup.doPostSetup(runtime.getInstance(Injector.class));
		return runtime;
	}
1354172
public JsonMappingOption yourCollections(List<JsonYourCollectionResource> yourCollections) {
        if (yourCollections == null) {
            throw new IllegalArgumentException("The argument 'yourCollections' should not be null.");
        }
        this.yourCollections = yourCollections;
        return this;
    }
966466
public static Option[] getCommonOptions() {
    return new Option[] {
      Option.builder()
              .hasArg()
              .required(false)
              .desc("Batch interval (seconds) for streaming applications; default is 1 second")
              .longOpt("batchInterval")
              .build(),
      Option.builder()
              .hasArg()
              .required(false)
              .desc("The master URL to connect to, such as \"local\" to run locally with one thread, \"local[4]\" to run locally with 4 cores, or \"spark://master:7077\" to run on a Spark standalone cluster.")
              .longOpt("master")
              .build(),
      Option.builder()
              .hasArg()
              .required(false)
              .desc("Address of the Zookeeper ensemble; defaults to: localhost:9983")
              .longOpt("zkHost")
              .build(),
      Option.builder()
              .hasArg()
              .required(false)
              .desc("Name of collection; no default")
              .longOpt("collection")
              .build(),
      Option.builder()
              .hasArg()
              .required(false)
              .desc("Number of docs to queue up on the client before sending to Solr; default is 10")
              .longOpt("batchSize")
              .build(),
      Option.builder()
              .hasArg()
              .required(false)
              .desc("For authenticating to Solr using JAAS, sets the '" + LOGIN_CONFIG_PROP + "' system property.")
              .longOpt("solrJaasAuthConfig")
              .build(),
      Option.builder()
              .hasArg()
              .required(false)
              .desc("For authenticating to Solr using JAAS, sets the 'solr.kerberos.jaas.appname' system property; default is Client")
              .longOpt("solrJaasAppName")
              .build()
    };
  }