| /** |
| * 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 1: VTCLFile ::= NamespaceDefAST NamespaceImportsAST GTASMDefAST |
| *</b> |
| */ |
| public class VTCLFile extends ASTNode implements IVTCLFile |
| { |
| private NamespaceDefAST _NamespaceDefAST; |
| private NamespaceImportsAST _NamespaceImportsAST; |
| private GTASMDefAST _GTASMDefAST; |
| |
| /** |
| * The value returned by <b>getNamespaceDefAST</b> may be <b>null</b> |
| */ |
| public NamespaceDefAST getNamespaceDefAST() { return _NamespaceDefAST; } |
| /** |
| * The value returned by <b>getNamespaceImportsAST</b> may be <b>null</b> |
| */ |
| public NamespaceImportsAST getNamespaceImportsAST() { return _NamespaceImportsAST; } |
| public GTASMDefAST getGTASMDefAST() { return _GTASMDefAST; } |
| |
| public VTCLFile(IToken leftIToken, IToken rightIToken, |
| NamespaceDefAST _NamespaceDefAST, |
| NamespaceImportsAST _NamespaceImportsAST, |
| GTASMDefAST _GTASMDefAST) |
| { |
| super(leftIToken, rightIToken); |
| |
| this._NamespaceDefAST = _NamespaceDefAST; |
| if (_NamespaceDefAST != null) ((ASTNode) _NamespaceDefAST).setParent(this); |
| this._NamespaceImportsAST = _NamespaceImportsAST; |
| if (_NamespaceImportsAST != null) ((ASTNode) _NamespaceImportsAST).setParent(this); |
| this._GTASMDefAST = _GTASMDefAST; |
| ((ASTNode) _GTASMDefAST).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 VTCLFile)) return false; |
| VTCLFile other = (VTCLFile) o; |
| if (_NamespaceDefAST == null && other.getNamespaceDefAST() != null) return false; |
| else if (! _NamespaceDefAST.equals(other.getNamespaceDefAST())) return false; |
| if (_NamespaceImportsAST == null && other.getNamespaceImportsAST() != null) return false; |
| else if (! _NamespaceImportsAST.equals(other.getNamespaceImportsAST())) return false; |
| if (! _GTASMDefAST.equals(other.getGTASMDefAST())) return false; |
| return true; |
| } |
| |
| public int hashCode() |
| { |
| int hash = 7; |
| hash = hash * 31 + (getNamespaceDefAST() == null ? 0 : getNamespaceDefAST().hashCode()); |
| hash = hash * 31 + (getNamespaceImportsAST() == null ? 0 : getNamespaceImportsAST().hashCode()); |
| hash = hash * 31 + (getGTASMDefAST().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); } |
| } |
| |
| |