blob: 44cbea79202aa6683178a1bafd9e7a057dc4499e [file] [log] [blame]
Thomas Vachuskaf9e0d172015-04-12 08:29:14 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Thomas Vachuskaf9e0d172015-04-12 08:29:14 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Thomas Vachuskac40d4632015-04-09 16:55:03 -070016package org.onosproject.cli;
Thomas Vachuskaf9e0d172015-04-12 08:29:14 -070017
Ray Milkeyd84f89b2018-08-17 14:54:17 -070018import org.apache.karaf.shell.api.console.CommandLine;
19import org.apache.karaf.shell.api.console.Completer;
20import org.apache.karaf.shell.api.console.Session;
21import org.apache.karaf.shell.support.completers.StringsCompleter;
22
23import java.util.List;
Thomas Vachuskaf9e0d172015-04-12 08:29:14 -070024
25/**
26 * Abstract argument completer.
27 */
28public abstract class AbstractCompleter implements Completer {
29
Ray Milkeyd84f89b2018-08-17 14:54:17 -070030 @Override
31 public int complete(Session session, CommandLine commandLine, List<String> candidates) {
32 StringsCompleter delegate = new StringsCompleter();
33
34 return delegate.complete(session, commandLine, candidates);
Thomas Vachuskaf9e0d172015-04-12 08:29:14 -070035 }
36
37}