T - The data object class in question.public class Getters<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
Function<T,Object> |
getter(String name)
Returns the getter with the given name as a
Function that takes an instance of the underlying type as
a parameter and returns the value of the represented property. |
Set<String> |
names()
Returns the names of the represented getters.
|
static <T> Getters<T> |
of(Class<T> subjectClass)
Returns a view of the getters of a given data object class.
|
Map<String,Object> |
toMap(T subject)
Results in a
Map that maps the names of the represented properties to their values. |
Class<?> |
type(String name)
Returns the result type of the getter with the given name.
|
public static <T> Getters<T> of(Class<T> subjectClass)
Getters in this sense are all public, parameterless instance methods that actually return a result
(not void or Void) that have not already been defined by Object and whose name begins
with one of the prefixes "get" or "is".
T - The data object class in question.public final Class<?> type(String name)
public final Function<T,Object> getter(String name)
Function that takes an instance of the underlying type as
a parameter and returns the value of the represented property.NoSuchElementException - if no suitable getter can be found.Copyright © 2026 Andreas Kluge-Kaindl, Bremen (de). All rights reserved.