blob: d2b0f118b4095169df4e00657ee650a5fb8e0efa [file] [log] [blame]
/**
* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Daniel Varro - Initial API and implementation
*
* This file was generated automatically based upon the VTCL LPG Parser
* VTCLParser.g
*/
package org.eclipse.viatra2.lpgparser.ast;
import lpg.lpgjavaruntime.*;
/**
*<b>
*<li>Rule 60: RelationshipBodyAST ::= LPAREN PatternVariableRefAST COMMA PatternVariableRefAST RPAREN
*</b>
*/
public class RelationshipBodyAST extends ASTNode implements IRelationshipBodyAST
{
private PatternVariableRefAST _PatternVariableRefAST;
private PatternVariableRefAST _PatternVariableRefAST4;
public PatternVariableRefAST getPatternVariableRefAST() { return _PatternVariableRefAST; }
public PatternVariableRefAST getPatternVariableRefAST4() { return _PatternVariableRefAST4; }
public RelationshipBodyAST(IToken leftIToken, IToken rightIToken,
PatternVariableRefAST _PatternVariableRefAST,
PatternVariableRefAST _PatternVariableRefAST4)
{
super(leftIToken, rightIToken);
this._PatternVariableRefAST = _PatternVariableRefAST;
((ASTNode) _PatternVariableRefAST).setParent(this);
this._PatternVariableRefAST4 = _PatternVariableRefAST4;
((ASTNode) _PatternVariableRefAST4).setParent(this);
initialize();
}
public boolean equals(Object o)
{
if (o == this) return true;
//
// The supers call is not required for now because Ast nodes
// can only extend the root Ast, AstToken and AstList and none
// of these nodes contain children.
//
// if (! super.equals(o)) return false;
//
if (! (o instanceof RelationshipBodyAST)) return false;
RelationshipBodyAST other = (RelationshipBodyAST) o;
if (! _PatternVariableRefAST.equals(other.getPatternVariableRefAST())) return false;
if (! _PatternVariableRefAST4.equals(other.getPatternVariableRefAST4())) return false;
return true;
}
public int hashCode()
{
int hash = 7;
hash = hash * 31 + (getPatternVariableRefAST().hashCode());
hash = hash * 31 + (getPatternVariableRefAST4().hashCode());
return hash;
}
public void accept(Visitor v) { v.visit(this); }
public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
public Object accept(ResultVisitor v) { return v.visit(this); }
public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
}