Skip to content

Conversation

@mp911de
Copy link
Member

@mp911de mp911de commented Nov 17, 2025

We now support type-safe property paths and property references:

Java variants:

PropertyPath.from("name", Person.class) // existing String-based API
PropertyPath.of(Person::getName) // type-safe property reference expression

PropertyPath.from("address.country", Person.class) // existing nested path API
PropertyPath.of(Person::getAddress).then(Address::getCountry) // type-safe composed path expression


PropertyReference.of(Secret::getSecret)

Kotlin variants:

PropertyReference.of(Secret::secret)

PropertyPath.of(Person::address / Address::city)

allowing type-safe usage through e.g.:

Sort.by(Person::getFirstName, Person::getLastName)

Module adoption:

@mp911de mp911de added the type: enhancement A general enhancement label Nov 17, 2025
Refine type naming.
Remove lambda cache in favor of resolved property references/PropertyPaths.
Inline KProperty references in TypedPropertyPaths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce first-class type-safe property path references at the core level

2 participants