Package software.amazon.smithy.cli
Class SmithyCli
- java.lang.Object
-
- software.amazon.smithy.cli.SmithyCli
-
public final class SmithyCli extends java.lang.Object
Entry point of the Smithy CLI.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALLOW_UNKNOWN_TRAITS
static java.lang.String
DISCOVER
static java.lang.String
DISCOVER_CLASSPATH
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SmithyCli
classLoader(java.lang.ClassLoader classLoader)
Sets a custom class loader to use when executing commands.static SmithyCli
create()
Creates a new instance of the CLI.static void
main(java.lang.String... args)
Executes the CLI.void
run(java.lang.String... args)
Runs the CLI.void
run(java.util.List<java.lang.String> args)
Runs the CLI using a list of arguments.
-
-
-
Field Detail
-
DISCOVER
public static final java.lang.String DISCOVER
- See Also:
- Constant Field Values
-
DISCOVER_CLASSPATH
public static final java.lang.String DISCOVER_CLASSPATH
- See Also:
- Constant Field Values
-
ALLOW_UNKNOWN_TRAITS
public static final java.lang.String ALLOW_UNKNOWN_TRAITS
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static SmithyCli create()
Creates a new instance of the CLI.- Returns:
- Returns the CLI instance.
-
main
public static void main(java.lang.String... args)
Executes the CLI.- Parameters:
args
- Arguments to parse and execute.
-
classLoader
public SmithyCli classLoader(java.lang.ClassLoader classLoader)
Sets a custom class loader to use when executing commands.- Parameters:
classLoader
- Class loader used to find models, traits, etc.- Returns:
- Returns the CLI.
-
run
public void run(java.util.List<java.lang.String> args)
Runs the CLI using a list of arguments.- Parameters:
args
- Arguments to parse and execute.
-
run
public void run(java.lang.String... args)
Runs the CLI.- Parameters:
args
- Arguments to parse and execute.
-
-