001    package edu.rice.cs.javalanglevels.tree;
002    
003    import edu.rice.cs.javalanglevels.SourceInfo;
004    
005    /**
006     * Class MethodDef, 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 MethodDef extends JExpression implements BodyItemI {
011      private final ModifiersAndVisibility _mav;
012      private final TypeParameter[] _typeParams;
013      private final ReturnTypeI _result;
014      private final Word _name;
015      private final FormalParameter[] _params;
016      private final ReferenceType[] _throws;
017    
018      /**
019       * Constructs a MethodDef.
020       * @throws java.lang.IllegalArgumentException  If any parameter to the constructor is null.
021       */
022      public MethodDef(SourceInfo in_sourceInfo, ModifiersAndVisibility in_mav, TypeParameter[] in_typeParams, ReturnTypeI in_result, Word in_name, FormalParameter[] in_params, ReferenceType[] in_throws) {
023        super(in_sourceInfo);
024    
025        if (in_mav == null) {
026          throw new java.lang.IllegalArgumentException("Parameter 'mav' to the MethodDef constructor was null. This class may not have null field values.");
027        }
028        _mav = in_mav;
029    
030        if (in_typeParams == null) {
031          throw new java.lang.IllegalArgumentException("Parameter 'typeParams' to the MethodDef constructor was null. This class may not have null field values.");
032        }
033        _typeParams = in_typeParams;
034    
035        if (in_result == null) {
036          throw new java.lang.IllegalArgumentException("Parameter 'result' to the MethodDef constructor was null. This class may not have null field values.");
037        }
038        _result = in_result;
039    
040        if (in_name == null) {
041          throw new java.lang.IllegalArgumentException("Parameter 'name' to the MethodDef constructor was null. This class may not have null field values.");
042        }
043        _name = in_name;
044    
045        if (in_params == null) {
046          throw new java.lang.IllegalArgumentException("Parameter 'params' to the MethodDef constructor was null. This class may not have null field values.");
047        }
048        _params = in_params;
049    
050        if (in_throws == null) {
051          throw new java.lang.IllegalArgumentException("Parameter 'throws' to the MethodDef constructor was null. This class may not have null field values.");
052        }
053        _throws = in_throws;
054      }
055    
056      public ModifiersAndVisibility getMav() { return _mav; }
057      public TypeParameter[] getTypeParams() { return _typeParams; }
058      public ReturnTypeI getResult() { return _result; }
059      public Word getName() { return _name; }
060      public FormalParameter[] getParams() { return _params; }
061      public ReferenceType[] getThrows() { return _throws; }
062    
063      public abstract <RetType> RetType visit(JExpressionIFVisitor<RetType> visitor);
064      public abstract void visit(JExpressionIFVisitor_void visitor);
065      public abstract void outputHelp(TabPrintWriter writer);
066      protected abstract int generateHashCode();
067    }