| java.lang.Object org.andromda.core.translation.ExpressionTranslator
ExpressionTranslator | public class ExpressionTranslator (Code) | | The expression translator class that all translations are performed through. This is the entry
point to expression (OCL, etc) translation.
author: Chad Brandon |
Method Summary | |
public void | initialize() Initializes the ExpressionTranslator. | public static ExpressionTranslator | instance() Gets the shared ExpressionTranslator instance. | public Expression | translate(String translationName, String expression, Object contextElement) Performs translation of the expression by looking up the
translationName from the available Translation-Libraries
found on the classpath.
Parameters: translationName - the name of the translation to use for translating(i.e. |
initialize | public void initialize()(Code) | | Initializes the ExpressionTranslator. This MUST be called to find and loal all available
translation-libraries.
|
translate | public Expression translate(String translationName, String expression, Object contextElement)(Code) | | Performs translation of the expression by looking up the
translationName from the available Translation-Libraries
found on the classpath.
Parameters: translationName - the name of the translation to use for translating(i.e. a translationName like 'query.EJB-QL' would mean use theEJB-QL translation from the query library. Parameters: expression - the actual expression to translate. Parameters: contextElement - the element which provides the context of thisexpression. This is passed from the model. This can be null. Expression the resulting expression instance which contains thetranslated expression as well as additional information about theexpression. |
|
|