public class CommandlineArgumentTranslator extends Object implements ArgumentTranslator
| Constructor and Description | 
|---|
CommandlineArgumentTranslator()
Construct a CommandlineArgumentTranslator. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected int[] | 
getPotentialArgs()
Gets the argument type a particular flag is expecting
 as defined by
 oracle.ifs.utilities.commandline.CommandlineArguments 
 | 
protected String[] | 
getPotentialFlags()
Gets the potentails flags that the
 oracle.ifs.utilities.commandline.CommandlineArguments
 object might be expecting. 
 | 
protected void | 
handleFlag(String flagKey,
          String flagValue,
          CommandContext context,
          Hashtable translationState)
Handles a specific Flag occurence. 
 | 
protected void | 
handlePositional(int pos,
                String positional,
                CommandContext context,
                Hashtable translationState)
Handles a specific Positional occurance. 
 | 
protected void | 
initialize(CommandContext context,
          Object invoker,
          Hashtable translationState)
Base implemtation does nothing 
 | 
protected void | 
parse(String cmdline,
     CommandContext context,
     Hashtable translationState)
Imposes the string parsing framework. 
 | 
protected void | 
postParse(CommandContext context,
         Object invoker,
         Hashtable translationState)
Called after parsing is complete. 
 | 
void | 
translate(CommandContext context,
         Object cmdKey,
         Object invoker,
         Object args)
A CommandlineArgumentTranslator casts the args object to a String and
 uses the notion of positionals and flagged arguments provided
 through a oracle.ifs.utilities.commandline.CommandlineArguments
 object. 
 | 
public static final String CMDKEY
public CommandlineArgumentTranslator()
public final void translate(CommandContext context, Object cmdKey, Object invoker, Object args) throws IfsException
translate in interface ArgumentTranslatorcontext - the command's context.cmdKey - the command's key within the invocation environment.invoker - the command's invoker.args - additional args to be interpreted.IfsExceptionCommandContext, 
CommandInvokerprotected void initialize(CommandContext context, Object invoker, Hashtable translationState) throws IfsException
IfsExceptionprotected void parse(String cmdline, CommandContext context, Hashtable translationState) throws IfsException
IfsExceptionprotected void postParse(CommandContext context, Object invoker, Hashtable translationState) throws IfsException
IfsExceptionprotected String[] getPotentialFlags()
protected int[] getPotentialArgs()
protected void handlePositional(int pos,
                                String positional,
                                CommandContext context,
                                Hashtable translationState)
                         throws IfsException
IfsExceptionprotected void handleFlag(String flagKey, String flagValue, CommandContext context, Hashtable translationState) throws IfsException
IfsExceptionCopyright © 2025. All rights reserved.