Package org.jline.console.impl
Class DescriptionAdapter
java.lang.Object
org.jline.console.impl.DescriptionAdapter
Converts between old console description types and new shell description types.
Provides static methods for bidirectional conversion:
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArgDescConverts a newArgumentDescriptionto an oldArgDesc.static ArgumentDescriptiontoArgumentDescription(ArgDesc argDesc) Converts an oldArgDescto a newArgumentDescription.static CmdDesctoCmdDesc(CommandDescription desc) Converts a newCommandDescriptionto an oldCmdDesc.static CmdLinetoCmdLine(CommandLine commandLine) Converts a newCommandLineto an oldCmdLine.static CommandDescriptiontoCommandDescription(CmdDesc cmdDesc) Converts an oldCmdDescto a newCommandDescription.static CommandLinetoCommandLine(CmdLine cmdLine) Converts an oldCmdLineto a newCommandLine.
-
Method Details
-
toCmdDesc
Converts a newCommandDescriptionto an oldCmdDesc.- Parameters:
desc- the command description, may be null- Returns:
- the CmdDesc, or null if input is null
-
toCommandDescription
Converts an oldCmdDescto a newCommandDescription.- Parameters:
cmdDesc- the CmdDesc, may be null- Returns:
- the CommandDescription, or null if input is null
-
toCmdLine
Converts a newCommandLineto an oldCmdLine.- Parameters:
commandLine- the command line, may be null- Returns:
- the CmdLine, or null if input is null
-
toCommandLine
Converts an oldCmdLineto a newCommandLine.- Parameters:
cmdLine- the CmdLine, may be null- Returns:
- the CommandLine, or null if input is null
-
toArgDesc
Converts a newArgumentDescriptionto an oldArgDesc.- Parameters:
arg- the argument description, may be null- Returns:
- the ArgDesc, or null if input is null
-
toArgumentDescription
Converts an oldArgDescto a newArgumentDescription.- Parameters:
argDesc- the ArgDesc, may be null- Returns:
- the ArgumentDescription, or null if input is null
-