Package com.pnfsoftware.jeb.core
Class OptionDefinition
java.lang.Object
com.pnfsoftware.jeb.core.OptionDefinition
- All Implemented Interfaces:
IOptionDefinition,ITypedOptionDefinition
- Direct Known Subclasses:
BooleanOptionDefinition,ListOptionDefinition
An implementation for an option description.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.pnfsoftware.jeb.core.ITypedOptionDefinition
ITypedOptionDefinition.Type -
Constructor Summary
ConstructorsConstructorDescriptionOptionDefinition(String description) Define a newoptionwith a single text to display.OptionDefinition(String name, String description) Define a newoption.OptionDefinition(String name, String defaultValue, String description) Define a newoption. -
Method Summary
-
Constructor Details
-
OptionDefinition
Define a newoptionwith a single text to display.- Parameters:
description- description
-
OptionDefinition
Define a newoption.- Parameters:
name- non-empty name. If null, will display a single text line (preferOptionDefinition(String)in this case).description- optional description
-
OptionDefinition
Define a newoption.- Parameters:
name- mandatory namedefaultValue- default valuedescription- option description
-
-
Method Details
-
getDescription
Get the option description.- Specified by:
getDescriptionin interfaceIOptionDefinition- Returns:
- option description
-
getName
Get the option name.- Specified by:
getNamein interfaceIOptionDefinition- Returns:
- option name, or null for a description-only entry
-
getDefaultValue
Get the option default value.- Specified by:
getDefaultValuein interfaceIOptionDefinition- Returns:
- default value, or null if none is defined
-
getType
Get the option type inferred from the option shape.- Specified by:
getTypein interfaceITypedOptionDefinition- Returns:
ITypedOptionDefinition.Type.Descriptionif this definition has no name, otherwiseITypedOptionDefinition.Type.Text
-
getOptions
Get additional option metadata.- Specified by:
getOptionsin interfaceITypedOptionDefinition- Returns:
- null for plain text options
-