Class BuildOptions
- java.lang.Object
-
- software.amazon.smithy.cli.commands.BuildOptions
-
- All Implemented Interfaces:
ArgumentReceiver
public final class BuildOptions extends java.lang.Object implements ArgumentReceiver
Arguments available to commands that load and build models.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALLOW_UNKNOWN_TRAITSstatic java.lang.StringDISCOVERstatic java.lang.StringDISCOVER_CLASSPATHstatic java.lang.StringDISCOVER_SHORTstatic java.lang.StringMODELS
-
Constructor Summary
Constructors Constructor Description BuildOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowUnknownTraits()booleandiscover()java.lang.StringdiscoverClasspath()voidregisterHelp(HelpPrinter printer)Registers help information to the givenHelpPrinter.booleantestOption(java.lang.String name)Test if the given value-less option is accepted by the receiver.java.util.function.Consumer<java.lang.String>testParameter(java.lang.String name)Test if the given parameter that requires a value is accepted by the receiver.
-
-
-
Field Detail
-
ALLOW_UNKNOWN_TRAITS
public static final java.lang.String ALLOW_UNKNOWN_TRAITS
- See Also:
- Constant Field Values
-
DISCOVER
public static final java.lang.String DISCOVER
- See Also:
- Constant Field Values
-
DISCOVER_SHORT
public static final java.lang.String DISCOVER_SHORT
- See Also:
- Constant Field Values
-
DISCOVER_CLASSPATH
public static final java.lang.String DISCOVER_CLASSPATH
- See Also:
- Constant Field Values
-
MODELS
public static final java.lang.String MODELS
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerHelp
public void registerHelp(HelpPrinter printer)
Description copied from interface:ArgumentReceiverRegisters help information to the givenHelpPrinter.- Specified by:
registerHelpin interfaceArgumentReceiver- Parameters:
printer- Printer to modify.
-
testOption
public boolean testOption(java.lang.String name)
Description copied from interface:ArgumentReceiverTest if the given value-less option is accepted by the receiver.If the option is accepted, the receiver should store a stateful value to indicate the option was received, and the CLI will skip the argument for further processing.
- Specified by:
testOptionin interfaceArgumentReceiver- Parameters:
name- Name of the option to test.- Returns:
- Returns true if accepted.
-
testParameter
public java.util.function.Consumer<java.lang.String> testParameter(java.lang.String name)
Description copied from interface:ArgumentReceiverTest if the given parameter that requires a value is accepted by the receiver.If the parameter is accepted, the receiver returns a Consumer that receives the expected value, and it should store a stateful value to allow the value to be later recalled. The CLI will skip the argument for further processing.
- Specified by:
testParameterin interfaceArgumentReceiver- Parameters:
name- Name of the parameter to test.- Returns:
- Returns a consumer if accepted or null if not accepted.
-
discoverClasspath
public java.lang.String discoverClasspath()
-
allowUnknownTraits
public boolean allowUnknownTraits()
-
discover
public boolean discover()
-
-