    001/*
    002  Licensed to the Apache Software Foundation (ASF) under one or more
    003  contributor license agreements.  See the NOTICE file distributed with
    004  this work for additional information regarding copyright ownership.
    005  The ASF licenses this file to You under the Apache License, Version 2.0
    006  (the "License"); you may not use this file except in compliance with
    007  the License.  You may obtain a copy of the License at
    008
    009      http://www.apache.org/licenses/LICENSE-2.0
    010
    011  Unless required by applicable law or agreed to in writing, software
    012  distributed under the License is distributed on an "AS IS" BASIS,
    013  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014  See the License for the specific language governing permissions and
    015  limitations under the License.
    016 */
    017
    018package org.apache.commons.cli;
    019
    020/**
    021 * The class BasicParser provides a very simple implementation of the {@link Parser#flatten(Options,String[],boolean)
    022 * flatten} method.
    023 *
    024 * @deprecated since 1.3, use the {@link DefaultParser} instead
    025 */
    026@Deprecated
    027public class BasicParser extends Parser {
    028    /**
    029     * <p>
    030     * A simple implementation of {@link Parser}'s abstract {@link Parser#flatten(Options, String[], boolean) flatten}
    031     * method.
    032     * </p>
    033     *
    034     * <p>
    035     * <b>Note:</b> {@code options} and {@code stopAtNonOption} are not used in this {@code flatten} method.
    036     * </p>
    037     *
    038     * @param options The command line {@link Options}
    039     * @param arguments The command line arguments to be parsed
    040     * @param stopAtNonOption Specifies whether to stop flattening when an non option is found.
    041     * @return The {@code arguments} String array.
    042     */
    043    @Override
    044    protected String[] flatten(@SuppressWarnings("unused") final Options options, final String[] arguments,
    045        @SuppressWarnings("unused") final boolean stopAtNonOption) {
    046        // just echo the arguments
    047        return arguments;
    048    }
    049}