I solved this a bit differently with property objects in Codename One. The core idea was to eliminate getters/setters and use general purpose property objects: codenameone.com/blog/properties-are-amazing.html
So the code would be:
public class Book implements PropertyBusinessObject {
public final Property<Book, String> isbn = new Property<>("isbn");
public final Property<Book, String> title = new Property<>("title");
public final Property<Book, String> author = new Property<>("author");
}
Notice I need the string names since code in Codename One is often obfuscated and I want runtime information.
Then we can create a book with a factory like this:
Book b = new Book()
.author.set("Shai Almog")
.title.set("Create an Uber Clone in 7 Days");