Examples of args()


Examples of org.apache.cxf.annotations.FactoryType.args()

                Factory f;
                if (scope.factoryClass() == FactoryType.DEFAULT.class) {
                    switch (scope.value()) {
                    case Session:
                        if (scope.args().length > 0) {
                            f = new SessionFactory(cls, Boolean.parseBoolean(scope.args()[0]));
                        } else {
                            f = new SessionFactory(cls);
                        }
                        break;
                    case PerRequest:
View Full Code Here

Examples of org.apache.cxf.annotations.FactoryType.args()

                        break;
                    case PerRequest:
                        f = new PerRequestFactory(cls);
                        break;
                    case Pooled:
                        f = new PooledFactory(cls, Integer.parseInt(scope.args()[0]));
                        break;
                    case Spring:
                        f = new SpringBeanFactory(scope.args()[0]);
                        break;
                    default:
View Full Code Here

Examples of org.apache.etch.interoptester.Prog.args()

  public void parse4() throws Exception
  {
    Prog p = Prog.parse( test, parseXml( "<prog name=\"foo\"/>" ) );
    assertSame( test, p.test() );
    assertEquals( "foo", p.name() );
    assertEquals( 0, p.args().size() );
  }
 
  /** @throws Exception */
  @org.junit.Test( expected = IllegalArgumentException.class )
  public void parse5() throws Exception
View Full Code Here

Examples of org.apache.etch.interoptester.Run.args()

  public void parse4() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"foo\"/>" ) );
    assertSame( itest, r.itest() );
    assertEquals( "foo", r.test() );
    assertEquals( 0, r.args().size() );
  }
 
  /** @throws Exception */
  @Test
  public void parse5() throws Exception
View Full Code Here

Examples of org.apache.etch.interoptester.Run.args()

  public void parse5() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"bar\"></run>" ) );
    assertSame( itest, r.itest() );
    assertEquals( "bar", r.test() );
    assertEquals( 0, r.args().size() );
  }
 
  /** @throws Exception */
  @Test( expected=IllegalArgumentException.class )
  public void parse6() throws Exception
View Full Code Here

Examples of org.apache.felix.gogo.options.Option.args()

                "  -x --xtrace              echo commands before execution",
                "  -? --help                show help",
                "If no script-file, an interactive shell is started, type $D to exit." };

        Option opt = Options.compile(usage).setOptionsFirst(true).parse(argv);
        List<String> args = opt.args();

        boolean login = opt.isSet("login");
        boolean interactive = !opt.isSet("nointeractive");

        if (opt.isSet("help"))
View Full Code Here

Examples of org.apache.phoenix.parse.FunctionParseNode.BuiltInFunction.args()

    private static void addBuiltInFunction(Class<? extends FunctionExpression> f) throws Exception {
        BuiltInFunction d = f.getAnnotation(BuiltInFunction.class);
        if (d == null) {
            return;
        }
        int nArgs = d.args().length;
        BuiltInFunctionInfo value = new BuiltInFunctionInfo(f, d);
        do {
            // Add function to function map, throwing if conflicts found
            // Add entry for each possible version of function based on arguments that are not required to be present (i.e. arg with default value)
            BuiltInFunctionKey key = new BuiltInFunctionKey(value.getName(), nArgs);
View Full Code Here

Examples of org.apache.phoenix.parse.FunctionParseNode.BuiltInFunction.args()

            // Add entry for each possible version of function based on arguments that are not required to be present (i.e. arg with default value)
            BuiltInFunctionKey key = new BuiltInFunctionKey(value.getName(), nArgs);
            if (BUILT_IN_FUNCTION_MAP.put(key, value) != null) {
                throw new IllegalStateException("Multiple " + value.getName() + " functions with " + nArgs + " arguments");
            }
        } while (--nArgs >= 0 && d.args()[nArgs].defaultValue().length() > 0);

        // Look for default values that aren't at the end and throw
        while (--nArgs >= 0) {
            if (d.args()[nArgs].defaultValue().length() > 0) {
                throw new IllegalStateException("Function " + value.getName() + " has non trailing default value of '" + d.args()[nArgs].defaultValue() + "'. Only trailing arguments may have default values");
View Full Code Here

Examples of org.apache.phoenix.parse.FunctionParseNode.BuiltInFunction.args()

            }
        } while (--nArgs >= 0 && d.args()[nArgs].defaultValue().length() > 0);

        // Look for default values that aren't at the end and throw
        while (--nArgs >= 0) {
            if (d.args()[nArgs].defaultValue().length() > 0) {
                throw new IllegalStateException("Function " + value.getName() + " has non trailing default value of '" + d.args()[nArgs].defaultValue() + "'. Only trailing arguments may have default values");
            }
        }
    }
    /**
 
View Full Code Here

Examples of org.apache.phoenix.parse.FunctionParseNode.BuiltInFunction.args()

        } while (--nArgs >= 0 && d.args()[nArgs].defaultValue().length() > 0);

        // Look for default values that aren't at the end and throw
        while (--nArgs >= 0) {
            if (d.args()[nArgs].defaultValue().length() > 0) {
                throw new IllegalStateException("Function " + value.getName() + " has non trailing default value of '" + d.args()[nArgs].defaultValue() + "'. Only trailing arguments may have default values");
            }
        }
    }
    /**
     * Reflect this class and populate static structures from it.
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.