public final class CliFile extends Object implements OnlineCommand
NOOPpublic CliFile(File file)
file).file - an existing file on the filesystemIllegalArgumentException - if file is null or doesn't existpublic CliFile(Class clazz)
clazz and have the .cli extension. On the classpath, the script file must live along
the class file.clazz - the class that will be used for loading the script and also for discovering its nameIllegalArgumentException - if the clazz is nullpublic CliFile(Class resourceLoader, String path)
path. The resource
will be loaded by the resourceLoader class (Class.getResourceAsStream(String)).resourceLoader - class that will be used to load the script from classpathpath - path to the script on classpath (absolute or relative to resourceLoader)IllegalArgumentException - if the resourceLoader or path is nullpublic void apply(OnlineCommandContext ctx) throws IOException, CliException, CommandFailedException
apply in interface OnlineCommandIOExceptionCliExceptionCommandFailedExceptionpublic String toString()
toString in interface OnlineCommandtoString in class ObjectCopyright © 2022. All rights reserved.