Examples of OptionImpl


Examples of org.apache.torque.generator.option.OptionImpl

    @Before
    public void setUp()
    {
        Options options = new Options();
        {
            Option optionWithoutNamespace = new OptionImpl(
                    "optionWithoutNamespace",
                    "ValueWithoutNamespace");
            options.setGlobalOption(optionWithoutNamespace);
        }
        {
            Option optionWithNamespace = new OptionImpl(
                    "org.apache.torque.generator.optionWithNamespace",
                    "ValueWithNamespace");
            options.setGlobalOption(optionWithNamespace);
        }
        {
            Option optionWithSpecialChars = new OptionImpl(
                    "opt${}i\\on",
                    "ValueWith${}Special\\Chars");
            options.setGlobalOption(optionWithSpecialChars);
        }
View Full Code Here

Examples of org.apache.torque.generator.option.OptionImpl

        assertEquals(Loglevel.DEBUG, unitConfiguration.getLoglevel());

        {
            Options expectedOptions = new Options();
            Set<Option> expectedOptionSet = new HashSet<Option>();
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("org.apache.torque.generator.optionWithNamespace"),
                    "optionWithNamespaceValue"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("org.apache.optionWithNamespace"),
                    "org.apache.optionWithNamespaceValue"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("optionWithoutNamespace", ""),
                    "optionWithoutNamespaceValue"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("optionPrecedenceLastFile"),
                    "value from xml"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("jdbcUrl"),
                    "jdbc.url.option.value"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("jdbcDriver"),
                    "jdbc.driver.option.value"));
            expectedOptions.addGlobalOptions(expectedOptionSet);
            assertOptionsEquals(
                    expectedOptions,
View Full Code Here

Examples of org.apache.torque.generator.option.OptionImpl

        }

        {
            Options expectedOptions = new Options();
            Set<Option> expectedOptionSet = new HashSet<Option>();
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("org.apache.torque.generator.optionWithNamespace"),
                    "optionWithNamespaceValue"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("org.apache.optionWithNamespace"),
                    "org.apache.optionWithNamespaceValue"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("optionWithoutNamespace", ""),
                    "optionWithoutNamespaceValue"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("optionPrecedenceLastFile"),
                    "value from xml"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("jdbcUrl"),
                    "jdbc.url.option.value"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("jdbcDriver"),
                    "jdbc.driver.option.value"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("parentOptionWithoutNamespace", ""),
                    "parentOptionWithoutNamespaceParentValue"));
            expectedOptionSet.add(new OptionImpl(
                    new QualifiedName("org.apache.torque.generator.parentOptionWithNamespace"),
                    "parentOptionWithNamespaceParentValue"));
            expectedOptions.addGlobalOptions(expectedOptionSet);
            assertOptionsEquals(
                    expectedOptions,
View Full Code Here

Examples of org.apache.torque.generator.option.OptionImpl

    {
        Set<Option> options = new HashSet<Option>();
        for (Entry<? extends Object, ? extends Object> entry
                : optionsMap.entrySet())
        {
            Option option = new OptionImpl(
                    entry.getKey().toString(),
                    entry.getValue());
            options.add(option);
            if (log.isTraceEnabled())
            {
View Full Code Here

Examples of org.kohsuke.args4j.spi.OptionImpl

  public void parse(CmdLineParser parser, Object bean) throws ClassNotFoundException {
        for(Class c=bean.getClass(); c!=null; c=c.getSuperclass()) {
          System.out.println("Class: " + c);
          for( Field f : c.getDeclaredFields() ) {
            Option o = new OptionImpl(createConfigElement(f));
        parser.addOption(Setters.create(f, bean), o );
          }
        }
  }
View Full Code Here

Examples of org.kohsuke.args4j.spi.OptionImpl

  public void parse(InputSource xml, CmdLineParser parser, Object bean) {
    try {
      Config config = Config.parse(xml);
      for(ConfigElement ce : config.options) {
        Option option = new OptionImpl(ce);
                parser.addOption(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), option);
      }
      for (ConfigElement ce : config.arguments) {
        Argument argument = new ArgumentImpl(ce);
        parser.addArgument(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), argument);
View Full Code Here

Examples of org.kohsuke.args4j.spi.OptionImpl

  public void parse(InputSource xml, CmdLineParser parser, Object bean) {
    try {
      Config config = Config.parse(xml);
      for(ConfigElement ce : config.options) {
        Option option = new OptionImpl(ce);
                parser.addOption(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), option);
      }
      for (ConfigElement ce : config.arguments) {
        Argument argument = new ArgumentImpl(ce);
        parser.addArgument(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), argument);
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.