toNamedAggregateGetter

Converts a property getter into a named aggregate getter.

This extension function creates an appropriate named aggregate getter based on the availability of a property getter and type metadata. If a property getter is provided, it creates a SimpleNamedAggregateGetter. Otherwise, it attempts to create a MetadataNamedAggregateGetter from the type's named aggregate metadata.

Return

A named aggregate getter, or null if neither property getter nor metadata is available.

Parameters

T

The type of the target object.

type

The class of the target type.