|
1 |
| package edu.rice.cs.javalanglevels.tree; |
|
2 |
| |
|
3 |
| import edu.rice.cs.javalanglevels.SourceInfo; |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| public abstract class MethodDef extends JExpression implements BodyItemI { |
|
11 |
| private final ModifiersAndVisibility _mav; |
|
12 |
| private final TypeParameter[] _typeParams; |
|
13 |
| private final ReturnTypeI _result; |
|
14 |
| private final Word _name; |
|
15 |
| private final FormalParameter[] _params; |
|
16 |
| private final ReferenceType[] _throws; |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| |
|
21 |
| |
|
22 |
255
| public MethodDef(SourceInfo in_sourceInfo, ModifiersAndVisibility in_mav, TypeParameter[] in_typeParams, ReturnTypeI in_result, Word in_name, FormalParameter[] in_params, ReferenceType[] in_throws) {
|
|
23 |
255
| super(in_sourceInfo);
|
|
24 |
| |
|
25 |
255
| if (in_mav == null) {
|
|
26 |
0
| throw new java.lang.IllegalArgumentException("Parameter 'mav' to the MethodDef constructor was null. This class may not have null field values.");
|
|
27 |
| } |
|
28 |
255
| _mav = in_mav;
|
|
29 |
| |
|
30 |
255
| if (in_typeParams == null) {
|
|
31 |
0
| throw new java.lang.IllegalArgumentException("Parameter 'typeParams' to the MethodDef constructor was null. This class may not have null field values.");
|
|
32 |
| } |
|
33 |
255
| _typeParams = in_typeParams;
|
|
34 |
| |
|
35 |
255
| if (in_result == null) {
|
|
36 |
0
| throw new java.lang.IllegalArgumentException("Parameter 'result' to the MethodDef constructor was null. This class may not have null field values.");
|
|
37 |
| } |
|
38 |
255
| _result = in_result;
|
|
39 |
| |
|
40 |
255
| if (in_name == null) {
|
|
41 |
0
| throw new java.lang.IllegalArgumentException("Parameter 'name' to the MethodDef constructor was null. This class may not have null field values.");
|
|
42 |
| } |
|
43 |
255
| _name = in_name;
|
|
44 |
| |
|
45 |
255
| if (in_params == null) {
|
|
46 |
0
| throw new java.lang.IllegalArgumentException("Parameter 'params' to the MethodDef constructor was null. This class may not have null field values.");
|
|
47 |
| } |
|
48 |
255
| _params = in_params;
|
|
49 |
| |
|
50 |
255
| if (in_throws == null) {
|
|
51 |
0
| throw new java.lang.IllegalArgumentException("Parameter 'throws' to the MethodDef constructor was null. This class may not have null field values.");
|
|
52 |
| } |
|
53 |
255
| _throws = in_throws;
|
|
54 |
| } |
|
55 |
| |
|
56 |
839
| public ModifiersAndVisibility getMav() { return _mav; }
|
|
57 |
588
| public TypeParameter[] getTypeParams() { return _typeParams; }
|
|
58 |
550
| public ReturnTypeI getResult() { return _result; }
|
|
59 |
831
| public Word getName() { return _name; }
|
|
60 |
715
| public FormalParameter[] getParams() { return _params; }
|
|
61 |
536
| public ReferenceType[] getThrows() { return _throws; }
|
|
62 |
| |
|
63 |
| public abstract <RetType> RetType visit(JExpressionIFVisitor<RetType> visitor); |
|
64 |
| public abstract void visit(JExpressionIFVisitor_void visitor); |
|
65 |
| public abstract void outputHelp(TabPrintWriter writer); |
|
66 |
| protected abstract int generateHashCode(); |
|
67 |
| } |