Class used for testing Introspection . @author Joel Costigliola
| 18 | * @author Joel Costigliola |
| 19 | */ |
| 20 | public class Employee implements Comparable<Employee>, Doctor { |
| 21 | // field public getter => valid property |
| 22 | private final int age; |
| 23 | |
| 24 | public int getAge() { |
| 25 | return age; |
| 26 | } |
| 27 | |
| 28 | // fields without public getter => not a property |
| 29 | private final String company = "google"; |
| 30 | |
| 31 | String getCompany() { |
| 32 | return company; |
| 33 | } |
| 34 | |
| 35 | private boolean firstJob; |
| 36 | |
| 37 | boolean isFirstJob() { |
| 38 | return firstJob; |
| 39 | } |
| 40 | |
| 41 | // field without getter => not a property |
| 42 | @SuppressWarnings("unused") |
| 43 | private final double salary; |
| 44 | |
| 45 | public Employee(double salary, int age) { |
| 46 | super(); |
| 47 | this.salary = salary; |
| 48 | this.age = age; |
| 49 | } |
| 50 | |
| 51 | @Override |
| 52 | public int compareTo(Employee other) { |
| 53 | return age - other.age; |
| 54 | } |
| 55 | } |
nothing calls this directly
no outgoing calls
no test coverage detected