1 package cz.cuni.amis.pogamut.shady;
2
3 import java.util.Collections;
4 import java.util.List;
5
6 /**
7 * During the execution of the tree, we have to go from one node to another and
8 * finally execute one primitive. Shady is using this class for representing
9 * the call. The target is identified only by name, it can be another node,
10 * action, or it doesn't have to exists at all (that will cause an exception).
11 *
12 * Name of the call can be same as FQN name of java class(for the most part).
13 *
14 * TODO: How is target determined. Probably search in order: node names, names
15 * on classpath, fqn names of classes.
16 *
17 * @author Honza
18 */
19 public class NodeCall {
20 private String name;
21 private final List<IArgument> argsUm;
22
23 /**
24 * Create new node call.
25 * @param name name of the target.
26 * @param args
27 */
28 public NodeCall(String name, List<IArgument> args) {
29 this.name = name;
30 this.argsUm = Collections.unmodifiableList(args);
31 }
32
33 /**
34 * Get name of the target
35 * @return target of call
36 */
37 public String getName() {
38 return name;
39 }
40
41 /**
42 * Get unmodifiable list of arguments.
43 * @return list of arguments
44 */
45 public List<IArgument> getArgs() {
46 return argsUm;
47 }
48 }
49