Package gda.jython.translator
Class NoopTranslator
java.lang.Object
gda.jython.translator.NoopTranslator
- All Implemented Interfaces:
AliasedCommandProvider,Translator
This translator performs no actions and returns the input unmodified.
Therefore aliasing is not supported.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAliasedCommand(String commandName) Adds a new aliased command.voidaddAliasedVarargCommand(String commandName) Adds a new variable argument aliased command.Returns the list of alias in the GDA command serverReturns the list of variable argument alias in the GDA command serverbooleanChecks if the the given command is aliased (either vararg or not)voidremoveAlias(String command) Remove the given command from the held lists of aliases.Translate a command potentially containing GDA extended syntax into the Jython equivalent.
-
Constructor Details
-
NoopTranslator
public NoopTranslator()
-
-
Method Details
-
getAliasedCommands
Description copied from interface:AliasedCommandProviderReturns the list of alias in the GDA command server- Specified by:
getAliasedCommandsin interfaceAliasedCommandProvider- Returns:
- the aliased commands
-
getAliasedVarargCommands
Description copied from interface:AliasedCommandProviderReturns the list of variable argument alias in the GDA command server- Specified by:
getAliasedVarargCommandsin interfaceAliasedCommandProvider- Returns:
- the list of variable argument alias
-
hasAlias
Description copied from interface:AliasedCommandProviderChecks if the the given command is aliased (either vararg or not)- Specified by:
hasAliasin interfaceAliasedCommandProvider- Parameters:
command- the string to check- Returns:
- whether the command is aliased or not
-
translate
Description copied from interface:TranslatorTranslate a command potentially containing GDA extended syntax into the Jython equivalent. Commands should be passed as one string rather than a line at a time as multiline constructs may need to be handled differently.- Specified by:
translatein interfaceTranslator- Parameters:
original_command- The full command as entered, possibly using extended syntax- Returns:
- Pure Jython equivalent of originalCommand. If original command contains other syntax errors, a best effort is made to preserve the errors after translation rather than fixing them.
-
addAliasedCommand
Description copied from interface:TranslatorAdds a new aliased command.- Specified by:
addAliasedCommandin interfaceTranslator- Parameters:
commandName-
-
addAliasedVarargCommand
Description copied from interface:TranslatorAdds a new variable argument aliased command.- Specified by:
addAliasedVarargCommandin interfaceTranslator- Parameters:
commandName-
-
removeAlias
Description copied from interface:TranslatorRemove the given command from the held lists of aliases. This will remove the command from both vararg and non-vararg lists- Specified by:
removeAliasin interfaceTranslator- Parameters:
command- to remove
-