Package gda.jython.translator
Class TokenStreamTranslator
java.lang.Object
gda.jython.translator.AliasingBase
gda.jython.translator.TokenStreamTranslator
- All Implemented Interfaces:
AliasedCommandProvider,Translator
-
Field Summary
Fields inherited from class gda.jython.translator.AliasingBase
aliases, varargAliases -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class gda.jython.translator.AliasingBase
addAliasedCommand, addAliasedVarargCommand, getAliasedCommands, getAliasedVarargCommands, hasAlias, removeAliasMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.jython.AliasedCommandProvider
getAliasedCommands, getAliasedVarargCommands, hasAliasMethods inherited from interface gda.jython.translator.Translator
addAliasedCommand, addAliasedVarargCommand, removeAlias
-
Constructor Details
-
TokenStreamTranslator
public TokenStreamTranslator()
-
-
Method Details
-
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:
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.
-