This class allows us to trace the parsing of the expression. It is reflectively extended by Javaassist to allow the
inclusion of all "inA" and "outA" methods produced by the SableCC parser. This allows us to dynamically include all
handling code in each method without having to manual code each one. It used used during development of Translators
since it allows you to see the execution of each node.
author: Chad Brandon
Constructor Summary
public
TraceTranslator() Constructs an instance of TraceTranslator.
Method Summary
protected static void
adaptClass() This method is called by the main method during the build process, to "adapt" the class to the OCL parser.
getOclFragmentName(CtMethod method) Returns the OCL fragment name that must have a matching name in the library translation template in order to be
placed into the Expression translated expression buffer.
Creates and returns the adapted translator class.
Class the new Class instance. throws: NotFoundException - throws: CannotCompileException - throws: IOException -
Creates and returns an new Instance of this ExpressionTranslator as a Translator object. The first time this
method is called this class will dynamically be adapted to handle all parser calls.
Translator
Returns the OCL fragment name that must have a matching name in the library translation template in order to be
placed into the Expression translated expression buffer.
Parameters: method - String
Checks to see if this class needs to be adapated If it has the "adapted" field then we know it already has been
adapted.
true/false, true if it needs be be adapted.