2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.validation.tool;
10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
11 import net.sourceforge.argparse4j.inf.ArgumentParser;
12 import net.sourceforge.argparse4j.inf.ArgumentParserException;
14 final class ParamsUtil {
15 private ParamsUtil() {
19 @SuppressFBWarnings(value = "DM_EXIT", justification = "We do expect to terminate the JVM")
20 static Params parseArgs(final String[] args, final ArgumentParser parser) {
21 final Params params = new Params();
23 parser.parseArgs(args, params);
25 } catch (final ArgumentParserException e) {
26 parser.handleError(e);