Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/rxm.git

Renamed ASTPayload to Payload.

AuthorDave Jarvis <email>
Date2015-03-08 17:32:27 GMT-0700
Commitacdc3b49099c94b9ca5622be858c00fd32c674f0
Parentba68c89
source/java/com/whitemagicsoftware/rxm/tree/Payload.java
+package com.whitemagicsoftware.rxm.tree;
+
+import com.whitemagicsoftware.rxm.grammar.QueryParser;
+
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.antlr.v4.runtime.Token;
+
+/**
+ * The wrapper class for ParserRuleContext. This class uses an implicit
+ * factory technique to derive the
+ */
+public class Payload extends ParserRuleContext {
+ /** Wrapped parser rule context instance. */
+ private ParserRuleContext ctx;
+
+ private Tree<Payload> tree;
+
+ public Payload( ParserRuleContext ctx ) {
+ setParserRuleContext( ctx );
+ }
+
+ @Override
+ public Token getStart() {
+ //System.out.println( getTree().getClass().getPackage().getName() );
+ //System.out.println( getParserRuleContext().getClass().getSimpleName() );
+ return getParserRuleContext().getStart();
+ }
+
+ @Override
+ public Token getStop() {
+ return getParserRuleContext().getStop();
+ }
+
+ /**
+ * Allows subclasses to retrieve the payload.
+ *
+ * @return The original (unwrapped) payload.
+ */
+ protected ParserRuleContext getParserRuleContext() {
+ return this.ctx;
+ }
+
+ /**
+ * Sets the payload.
+ *
+ * @param ctx The original (unwrapped) payload.
+ */
+ private void setParserRuleContext( ParserRuleContext ctx ) {
+ this.ctx = ctx;
+ }
+
+ public void setTree( Tree<Payload> tree ) {
+ this.tree = tree;
+ }
+
+ public Tree<Payload> getTree() {
+ return this.tree;
+ }
+}
+
Delta60 lines added, 0 lines removed, 60-line increase