Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 636 Bytes

File metadata and controls

17 lines (12 loc) · 636 Bytes

beanpath

Staticly checked Java Bean property paths to be used instead of string literals.

Eg:

Account account = root(Account.class);
BeanPath<String> customerNameProp = $( account.getCustomer().getName() );
// then customerNameProp.toDotDelimitedString() => "customer.name"

The core idea is to use runtime proxies to capture method (as in mock frameworks).

See more examples and some explanation in BeanPathMagicTest.

More info on Habrahabr [ru]