-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFunction.java
83 lines (66 loc) · 2.11 KB
/
Function.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import minipython.node.PExpression;
import minipython.node.PStatement;
import java.util.Arrays;
public class Function {
private String name;
private int line;
private PStatement statement;
private int numOfDefaultParameters;
private int numOfAllParameters;
private Variable[] parameters;
public Function(String name, int line, int numOfDefaultParameters, int numOfAllParameters, PStatement statement, Variable[] parameters) {
this.name = name;
this.line = line;
this.statement = statement;
this.numOfDefaultParameters = numOfDefaultParameters;
this.numOfAllParameters = numOfAllParameters;
this.parameters = parameters;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getLine() {
return line;
}
public void setLine(int line) {
this.line = line;
}
public PStatement getStatement() {
return statement;
}
public void setStatement(PStatement statement) {
this.statement = statement;
}
public int getNumOfDefaultParameters() {
return numOfDefaultParameters;
}
public void setNumOfDefaultParameters(int numOfDefaultParameters) {
this.numOfDefaultParameters = numOfDefaultParameters;
}
public int getNumOfAllParameters() {
return numOfAllParameters;
}
public void setNumOfAllParameters(int numOfAllParameters) {
this.numOfAllParameters = numOfAllParameters;
}
public Variable[] getParameters() {
return parameters;
}
public void setParameters(Variable[] parameters) {
this.parameters = parameters;
}
@Override
public String toString() {
return "Function{" +
"name='" + name + '\'' +
", line=" + line +
", statement=" + statement +
", numOfDefaultParameters=" + numOfDefaultParameters +
", numOfAllParameters=" + numOfAllParameters +
", parameters=" + Arrays.toString(parameters) +
'}';
}
}