001 package edu.rice.cs.javalanglevels.tree;
002
003 import edu.rice.cs.javalanglevels.SourceInfo;
004
005 /**
006 * Class TryCatchStatement, a component of the JExpressionIF composite hierarchy.
007 * Note: null is not allowed as a value for any field.
008 * @version Generated automatically by ASTGen at Sun Mar 04 23:01:27 CST 2012
009 */
010 public abstract class TryCatchStatement extends Statement {
011 private final Block _tryBlock;
012 private final CatchBlock[] _catchBlocks;
013
014 /**
015 * Constructs a TryCatchStatement.
016 * @throws java.lang.IllegalArgumentException If any parameter to the constructor is null.
017 */
018 public TryCatchStatement(SourceInfo in_sourceInfo, Block in_tryBlock, CatchBlock[] in_catchBlocks) {
019 super(in_sourceInfo);
020
021 if (in_tryBlock == null) {
022 throw new java.lang.IllegalArgumentException("Parameter 'tryBlock' to the TryCatchStatement constructor was null. This class may not have null field values.");
023 }
024 _tryBlock = in_tryBlock;
025
026 if (in_catchBlocks == null) {
027 throw new java.lang.IllegalArgumentException("Parameter 'catchBlocks' to the TryCatchStatement constructor was null. This class may not have null field values.");
028 }
029 _catchBlocks = in_catchBlocks;
030 }
031
032 public Block getTryBlock() { return _tryBlock; }
033 public CatchBlock[] getCatchBlocks() { return _catchBlocks; }
034
035 public abstract <RetType> RetType visit(JExpressionIFVisitor<RetType> visitor);
036 public abstract void visit(JExpressionIFVisitor_void visitor);
037 public abstract void outputHelp(TabPrintWriter writer);
038 protected abstract int generateHashCode();
039 }