My rule is as follows:
when
C : Company()
$empname : List() collect from (Employee($empname : empname) from C.employees)
then
System.out.println($empname);
The corresponding class:
public class Company {
private List<Employee> employees;
private Stringlocation;
}
public class Employee {
private String empname;
private int empid;
}
With my code, I am only getting the Employee Objects but how do I get the empnames
list?