Package org.jline.console.impl
Class DescriptionAdapter
- java.lang.Object
-
- org.jline.console.impl.DescriptionAdapter
-
public final class DescriptionAdapter extends java.lang.ObjectConverts between old console description types and new shell description types.Provides static methods for bidirectional conversion:
- Since:
- 4.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArgDesctoArgDesc(ArgumentDescription arg)Converts 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 Detail
-
toCmdDesc
public static CmdDesc toCmdDesc(CommandDescription desc)
Converts a newCommandDescriptionto an oldCmdDesc.- Parameters:
desc- the command description, may be null- Returns:
- the CmdDesc, or null if input is null
-
toCommandDescription
public static CommandDescription toCommandDescription(CmdDesc cmdDesc)
Converts an oldCmdDescto a newCommandDescription.- Parameters:
cmdDesc- the CmdDesc, may be null- Returns:
- the CommandDescription, or null if input is null
-
toCmdLine
public static CmdLine toCmdLine(CommandLine commandLine)
Converts a newCommandLineto an oldCmdLine.- Parameters:
commandLine- the command line, may be null- Returns:
- the CmdLine, or null if input is null
-
toCommandLine
public static CommandLine toCommandLine(CmdLine cmdLine)
Converts an oldCmdLineto a newCommandLine.- Parameters:
cmdLine- the CmdLine, may be null- Returns:
- the CommandLine, or null if input is null
-
toArgDesc
public static ArgDesc toArgDesc(ArgumentDescription arg)
Converts a newArgumentDescriptionto an oldArgDesc.- Parameters:
arg- the argument description, may be null- Returns:
- the ArgDesc, or null if input is null
-
toArgumentDescription
public static ArgumentDescription toArgumentDescription(ArgDesc argDesc)
Converts an oldArgDescto a newArgumentDescription.- Parameters:
argDesc- the ArgDesc, may be null- Returns:
- the ArgumentDescription, or null if input is null
-
-