blob: 23af57f5f0188aae9930279f775c9e34302f4960 (
plain)
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
|
package org.zwobble.couscous.interpreter.values;
import org.zwobble.couscous.interpreter.PositionalArguments;
public class MethodCallArguments<T> {
private final T receiver;
private final PositionalArguments positionalArguments;
public InterpreterValue get(int index) {
return positionalArguments.get(index);
}
private MethodCallArguments(final T receiver, final PositionalArguments positionalArguments) {
this.receiver = receiver;
this.positionalArguments = positionalArguments;
}
public static <T> MethodCallArguments<T> of(final T receiver, final PositionalArguments positionalArguments) {
return new MethodCallArguments<T>(receiver, positionalArguments);
}
public T getReceiver() {
return this.receiver;
}
public PositionalArguments getPositionalArguments() {
return this.positionalArguments;
}
}
|