1 package examples;
2
3 import org.pojomatic.Pojomatic;
4 import org.pojomatic.Pojomator;
5 import org.pojomatic.annotations.AutoProperty;
6
7 @AutoProperty
8 public class Manual {
9 private String firstName, lastName;
10
11 public Manual(String firstName, String lastName) {
12 this.firstName = firstName;
13 this.lastName = lastName;
14 }
15
16
17 public String getFirstName() { return this.firstName; }
18 public String getLastName() { return this.lastName; }
19
20 private final static Pojomator<Manual> POJOMATOR = Pojomatic.pojomator(Manual.class);
21
22 @Override public boolean equals(Object other) {
23 return POJOMATOR.doEquals(this, other);
24 }
25
26 @Override public int hashCode() {
27 return POJOMATOR.doHashCode(this);
28 }
29
30 @Override public String toString() {
31 return POJOMATOR.doToString(this);
32 }
33
34 public static void main(String[] args) {
35 System.out.println(new Manual("first", "last"));
36 }
37 }