Package com.bungleton.yarrgs

Examples of com.bungleton.yarrgs.YarrgConfigurationException


        for (Entry<Field, Parser<?>> entry : parsers.entrySet()) {
            Object value = entry.getValue().getResult();
            try {
                entry.getKey().set(instance, value);
            } catch (Exception e) {
                throw new YarrgConfigurationException("Expected to be able to set '"
                    + entry.getKey() + "' to " + value, e);
            }
        }
    }
View Full Code Here


                Map<Integer, PositionalArgument> positionals =
                        pos.value() < 0 ? negaPositionals : posiPositionals;
                PositionalArgument existent =
                    positionals.put(pos.value(), new PositionalArgument(f));
                if (existent != null) {
                    throw new YarrgConfigurationException("Attempted to assign '" + f
                        + "' to the same position as '" + existent.field + "'");
                }
            } else {
                addOption(new ValueOptionArgument(f));
            }
View Full Code Here

    {
        T t;
        try {
            t = _argumentHolder.newInstance();
        } catch (Exception e) {
            throw new YarrgConfigurationException("'" + _argumentHolder
                + "' must have a public no-arg constructor", e);
        }
        new ParseRunner<T>(args, t, this);
        return t;
    }
View Full Code Here

TOP

Related Classes of com.bungleton.yarrgs.YarrgConfigurationException

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.