Package com.sk89q.intake.parametric.argument

Examples of com.sk89q.intake.parametric.argument.StringArgumentStack


    private static ArgumentStack getScopedContext(Parameter parameter, ArgumentStack existing) {
        if (parameter.getFlag() != null) {
            CommandContext context = existing.getContext();
           
            if (parameter.isValueFlag()) {
                return new StringArgumentStack(context, context.getFlag(parameter.getFlag()), false);
            } else {
                String v = context.hasFlag(parameter.getFlag()) ? "true" : "false";
                return new StringArgumentStack(context, v, true);
            }
        }
       
        return existing;
    }
View Full Code Here


        ParameterData parameter = parameters[i];
       
        String[] defaultValue = parameter.getDefaultValue();
        if (defaultValue != null) {
            try {
                return parameter.getBinding().bind(parameter, new StringArgumentStack(context, defaultValue, false), false);
            } catch (MissingParameterException e) {
                throw new ParametricException(
                        "The default value of the parameter using the binding " +
                        parameter.getBinding().getClass() + " in the method\n" +
                        method.toGenericString() + "\nis invalid");
View Full Code Here

TOP

Related Classes of com.sk89q.intake.parametric.argument.StringArgumentStack

Copyright © 2018 www.massapicom. 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.