content: /* Generated By:JJTree: Do not edit this line. ExpObjPath.java Version 7.0 */
  /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=Exp,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
  package io.agrest.exp.parser;
  
  import io.agrest.exp.AgExpressionException;
  
  import java.util.Collections;
  import java.util.Map;
  
  public
  class ExpPath extends SimpleNode {
  
    protected Map<String, String> pathAliases = Collections.emptyMap();
  
    public ExpPath(int id) {
      super(id);
    }
  
    public ExpPath(AgExpressionParser p, int id) {
      super(p, id);
    }
  
    public ExpPath() {
      super(AgExpressionParserTreeConstants.JJTPATH);
    }
  
    public ExpPath(String path) {
      this();
      setPath(path);
    }
  
    public String getPath() {
      return (String)jjtGetValue();
    }
  
    public void setPath(String path) {
      jjtSetValue(path);
    }
  
    public Map<String, String> getPathAliases() {
      return pathAliases;
    }
  
    public void setPathAliases(Map<String, String> pathAliases) {
      this.pathAliases = pathAliases;
    }
  
    @Override
    public void jjtSetValue(Object value) {
      super.jjtSetValue(value);
      syncAliases();
    }
  
    /** Accept the visitor. **/
    public <T> T jjtAccept(AgExpressionParserVisitor<T> visitor, T data) {
  
      return
      visitor.visit(this, data);
    }
  
    protected void syncAliases() {
      try {
        ParsingUtils.processPathAliases(this);
      } catch (ParseException e) {
        throw new AgExpressionException(e);
      }
    }
  
    @Override
    protected ExpPath shallowCopy() {
      ExpPath copy = new ExpPath(id);
      copy.setPath(getPath());
      return copy;
    }
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      if (!super.equals(o)) {
        return false;
      }
  
      ExpPath expPath = (ExpPath) o;
      return getPath().equals(expPath.getPath());
    }
  
    @Override
    public int hashCode() {
      return 31 * super.hashCode() + getPath().hashCode();
    }
  
    @Override
    public String toString() {
      return ExpStringConverter.convert(this);
    }
  }
  /* JavaCC - OriginalChecksum=ffcf3b869e9e5d281a4b47d7ac3ebd15 (do not edit this line) */
  