agrestio / agrest

Server-side Java REST Framework for easy access to data graphs from various backends
https://agrest.io
Apache License 2.0
80 stars 34 forks source link

Expand the definition of "getter" and "setter" #618

Closed andrus closed 1 year ago

andrus commented 1 year ago

At present the industry definitions of a "getter" and a "setter" are broader than they were in the olden Java Bean days:

// classic "java bean"
public T getXyz() {}

// classic "java bean" boolean
public boolean isXyz() {}

// an implicit "getter" in a Java Record
public T xyz() {}
// classic "java bean" setter
public void setXyz(T t) {}

// fluent setter
public This setXyz(T t) {}

Our property compiler should respect all flavors, not just the classic ones.