1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.cli.processor.command;
7   
8   import java.nio.file.Path;
9   import java.nio.file.Paths;
10  import java.util.Collection;
11  import java.util.Collections;
12  
13  import edu.umd.cs.findbugs.annotations.NonNull;
14  
15  public abstract class AbstractTerminalCommand implements ICommand {
16  
17    @SuppressWarnings("null")
18    @Override
19    public Collection<ICommand> getSubCommands() {
20      return Collections.emptyList();
21    }
22  
23    @Override
24    public boolean isSubCommandRequired() {
25      return false;
26    }
27  
28    protected static Path resolvePathAgainstCWD(@NonNull Path path) {
29      return Paths.get("").toAbsolutePath().resolve(path).normalize();
30    }
31  }