2 * Copyright 2000-2015 JetBrains s.r.o.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package com.jetbrains.python.commandInterface.commandsWithArgs;
18 import org.jetbrains.annotations.NotNull;
19 import org.jetbrains.annotations.Nullable;
22 * Simple command implementation
24 * @author Ilya.Kazakevich
26 public class CommandAdapter implements Command {
28 private final String myName;
30 private final String myHelp;
32 private final ArgumentsInfo myArgumentsInfo;
35 * @param help help text
36 * @param name command name
37 * @param argumentsInfo arguments info
39 public CommandAdapter(@NotNull final String name, @Nullable final String help, @NotNull ArgumentsInfo argumentsInfo) {
42 myArgumentsInfo = argumentsInfo;
46 * @return command name
50 public final String getName() {
57 public final String getHelp() {
64 public final ArgumentsInfo getArgumentsInfo() {
65 return myArgumentsInfo;