| Author | Dave Jarvis <email> |
|---|---|
| Date | 2015-03-08 19:59:43 GMT-0700 |
| Commit | fa8e04c65384786f25562fb0a3f1a491e9ebb48a |
| Parent | f90899b |
| * respective output document. | ||
| * </p> | ||
| + * <p> | ||
| * By virtue of the Tree being in the package with te *Context classes, | ||
| * the *Context class names themselves can be derived, and therefore | ||
| * instantiated. (The *Context class names directly correspond to QueryParser | ||
| * inner class names and are therefore coupled to the language grammar.) | ||
| - * <p> | ||
| + * </p> | ||
| */ | ||
| public class Payload extends ParserRuleContext { | ||
| /** Wrapped parser rule context instance. */ | ||
| private ParserRuleContext ctx; | ||
| /** Parser rule context instance for transforming the payload. */ | ||
| private ParserRuleContext transformer; | ||
| - /** Abstract Syntax Tree (the factory tree). */ | ||
| + /** Abstract Syntax Tree (the implicit factory tree). */ | ||
| private Tree<Payload> tree; | ||
| * Called when entering a new hierarchy in the transformation tree. | ||
| * | ||
| - * @param payload The data to transform into its opening text. | ||
| - * @return The opening for the transformed payload text. | ||
| + * @param tree The tree containing data to transform into its opening text. | ||
| + * @return The opening expression for the transformed payload text. | ||
| */ | ||
| protected abstract String start( Tree<T> tree ); | ||
| /** | ||
| * Called when exiting a new hierarchy in the transformation tree. | ||
| * | ||
| - * @param payload The data to transform into its closing text. | ||
| - * @return The closing for the transformed payload text. | ||
| + * @param tree The tree containing data to transform into its closing text. | ||
| + * @return The closing expression for the transformed payload text. | ||
| */ | ||
| protected abstract String stop( Tree<T> tree ); |
| * determine their database entity context. This allows subclasses | ||
| * to use the correct entity alias as defined by the <b>rxm</b>. | ||
| + * | ||
| + * @return The tree, used as the implicit factory mechanism, containing | ||
| + * the AST context. | ||
| */ | ||
| protected Tree<Payload> getTree() { | ||
| return this.tree; | ||
| } | ||
| /** | ||
| * Closes the current payload transformation. Subclasses must override | ||
| * this to provide the correct opening SQL/XML expression. | ||
| + * | ||
| + * @return The token text that makes up the start of a SQL/XML expression | ||
| + * (a left-parenthesis by default). | ||
| */ | ||
| @Override | ||
| public Token getStart() { | ||
| return new Token( "(" ); | ||
| } | ||
| /** | ||
| * Closes the current payload transformation. Subclasses may override | ||
| * this to provide a custom closing SQL/XML expression. | ||
| + * | ||
| + * @return The token text that makes up the start of a SQL/XML expression | ||
| + * (a right-parenthesis by default). | ||
| */ | ||
| @Override |
| Delta | 16 lines added, 6 lines removed, 10-line increase |
|---|