Examples of Option


Examples of org.jboss.aesh.cl.Option

            throw new CommandLineParserException("Commands must be annotated with @CommandDefinition");

        ProcessedCommand processedCommand = new ProcessedCommand(command.name(), command.description(), command.validator());

        for(Field field : clazz.getDeclaredFields()) {
            Option o;
            OptionGroup og;
            OptionList ol;
            Arguments a;
            if((o = field.getAnnotation(Option.class)) != null) {
                OptionType optionType;
                if(o.hasValue())
                    optionType = OptionType.NORMAL;
                else
                    optionType = OptionType.BOOLEAN;
                if(o.name() == null || o.name().length() < 1) {
                    processedCommand.addOption(o.shortName(), field.getName(), o.description(),
                            o.argument(), o.required(), ',', o.defaultValue(),
                            field.getType(), field.getName(), optionType, o.converter(),
                            o.completer(), o.validator(), o.activator(), o.renderer(), o.overrideRequired());
                }
                else {
                    processedCommand.addOption(o.shortName(), o.name(), o.description(),
                            o.argument(), o.required(), ',', o.defaultValue(),
                            field.getType(), field.getName(), optionType, o.converter(),
                            o.completer(), o.validator(), o.activator(), o.renderer(), o.overrideRequired());
                }

            }
            else if((ol = field.getAnnotation(OptionList.class)) != null) {
                if(!Collection.class.isAssignableFrom(field.getType()))
View Full Code Here

Examples of org.jboss.cache.config.Option

      assertEquals(expected, eventLog.events);
   }
  
   protected void setSuppressEventNotification()
   {
      Option option = new Option();
      option.setSuppressEventNotification(true);
      cache.getInvocationContext().setOptionOverrides(option);     
   }
View Full Code Here

Examples of org.jboss.cache.config.Option

      c = new Configuration();
      c.setCacheMode("REPL_SYNC");
      c.setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
      cache2 = (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(c, false, getClass());

      cacheModeLocal = new Option();
      cacheModeLocal.setCacheModeLocal(true);
   }
View Full Code Here

Examples of org.jboss.dna.jcr.JcrRepository.Option

            for (Location optionLocation : optionsNode.getChildren()) {
                Node optionNode = configuration.getNodeAt(optionLocation);
                Path.Segment segment = optionLocation.getPath().getLastSegment();
                Property valueProperty = optionNode.getProperty(DnaLexicon.VALUE);
                if (valueProperty == null) continue;
                Option option = Option.findOption(segment.getName().getLocalName());
                if (option == null) continue;
                options.put(option, valueProperty.getFirstValue().toString());
            }
        }
View Full Code Here

Examples of org.jboss.forge.addon.ui.annotation.Option

      int position = 0;
      for (Class<?> parameterType : method.getParameterTypes())
      {
         if (!ReservedParameters.isReservedParameter(parameterType))
         {
            Option option = null;
            for (Annotation annotation : method.getParameterAnnotations()[position])
            {
               if (annotation instanceof Option)
               {
                  option = (Option) annotation;
               }
            }

            if (option != null)
            {
               char shortName = option.shortName();
               String paramName = (option.value().isEmpty()) ? "param" + position : option.value();
               InputComponent<?, ?> input;
               if (Iterable.class.isAssignableFrom(parameterType))
               {
                  // TODO: UIInputMany or UISelectMany ?
                  input = factory.createInputMany(paramName, shortName, parameterType);
View Full Code Here

Examples of org.jboss.forge.shell.plugins.Option

               for (Annotation annotation : parameterAnnotations[i])
               {
                  if (annotation instanceof Option)
                  {
                     Option option = (Option) annotation;
                     optionMeta.setParent(commandMeta);
                     optionMeta.setName(option.name());
                     optionMeta.setShortName(option.shortName());
                     optionMeta.setFlagOnly(option.flagOnly());
                     optionMeta.setDescription(option.description());
                     optionMeta.setDefaultValue(option.defaultValue());
                     optionMeta.setHelp(option.help());
                     optionMeta.setRequired(option.required());
                     optionMeta.setPromptType(option.type());
                     optionMeta.setCompleterType(option.completer());

                  }
                  else if (annotation instanceof PipeIn)
                  {
                     optionMeta.setPipeIn(true);
View Full Code Here

Examples of org.jclouds.gogrid.domain.Option

   @Override
   @SelectJson("list")
   @OnlyElement
   public Server expected() {
      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");
      Option centOs = Option.createWithIdNameAndDescription(13L, "CentOS 5.2 (32-bit)", "CentOS 5.2 (32-bit)");
      Option webServer = Option.createWithIdNameAndDescription(1L, "Web Server", "Web or Application Server");
      return Server.builder().id(75245L).datacenter(dc).isSandbox(false).name("PowerServer").description("server to test the api. created by Alex")
            .state(ServerState.ON).type(webServer).ram(Option.createWithIdNameAndDescription(1L, "512MB", "Server with 512MB RAM"))
            .os(centOs).ip(Ip.builder().id(1313079L).ip("204.51.240.178").subnet("204.51.240.176/255.255.255.240").isPublic(true).state(IpState.ASSIGNED).datacenter(dc).build())
            .image(ServerImage.builder().id(1946L).name("GSI-f8979644-e646-4711-ad58-d98a5fa3612c").friendlyName("BitNami Gallery 2.3.1-0")
                  .description("http://bitnami.org/stack/gallery").os(centOs).type(ServerImageType.WEB_APPLICATION_SERVER)
View Full Code Here

Examples of org.jcommando.Option

   /**
     * JCommando generated constructor.
     */
   public CommandLineParser()
   {
      Option alg = new Option();
      alg.setId("alg");
      alg.setShortMnemonic("a");
      alg.setLongMnemonic("alg");
      alg.setDescription("Algorithm");
      alg.setOptionType("String");
      addOption(alg);

      Option graph = new Option();
      graph.setId("graph");
      graph.setShortMnemonic("g");
      graph.setLongMnemonic("graph");
      graph.setDescription("Graph");
      graph.setOptionType("String");
      addOption(graph);

      Option graphtype = new Option();
      graphtype.setId("graphtype");
      graphtype.setShortMnemonic("gt");
      graphtype.setLongMnemonic("graphtype");
      graphtype.setDescription("Graph Type");
      graphtype.setOptionType("String");
      addOption(graphtype);

      Option inputfile = new Option();
      inputfile.setId("inputfile");
      inputfile.setShortMnemonic("i");
      inputfile.setLongMnemonic("inputfile");
      inputfile.setDescription("Input file for the graph");
      inputfile.setOptionType("String");
      addOption(inputfile);

      Option classpath = new Option();
      classpath.setId("classpath");
      classpath.setShortMnemonic("cp");
      classpath.setLongMnemonic("classpath");
      classpath.setDescription("Specify the class path of the algorithm.");
      classpath.setOptionType("String");
      addOption(classpath);

      Command create = new Command();
      create.setName("create");
      create.setId("create");
View Full Code Here

Examples of org.jitterbit.application.ui.Alert.Option

     *         <code>false</code> if the dialog was shown and the user dismissed it with a
     *         non-affirmative choice
     */
    public boolean ask(Component owner) {
        if (pref.get()) {
            Option o = Alert.ask(owner, createUi(), title, options, initialOption, messageType);
            if (o.isAffirmative()) {
                if (doNotShowAgainCheck.isSelected()) {
                    pref.set(false);
                }
                return true;
            }
View Full Code Here

Examples of org.jivesoftware.smackx.FormField.Option

        sb.append(">");
       
        Iterator<Option> options = field.getOptions();
       
        while(options.hasNext()) {
            Option option = options.next();
            sb.append("<option value='");
            sb.append(option.getValue());
            sb.append("'");
           
            if(values.contains(option.getValue())) {
                sb.append(" selected");
            }
            sb.append(">");
            if(option.getLabel() != null) {
                sb.append(option.getLabel());
            } else {
                sb.append(option.getValue());
            }
       
            sb.append("</option>");
        }
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.