org.springframework.data.mapping.model

## Interface PreferredConstructorDiscoverer<T,P extends PersistentProperty<P>>

    public interface PreferredConstructorDiscoverer<T,P extends PersistentProperty<P>>

Helper class to find a `PreferredConstructor`.

Author:
  Oliver Gierke, Christoph Strobl, Roman Rodov, Mark Paluch

### Nested Class Summary

Nested Classes
`static class` `PreferredConstructorDiscoverer.Discoverers` Helper class to find a `PreferredConstructor`.

### Method Summary

All Methods Static Methods Default Methods
`static <T,P extends PersistentProperty<P>> PreferredConstructor<T,P>` `discover(Class<T> type)` Discovers the `PreferredConstructor` for the given type.
`static <T,P extends PersistentProperty<P>> PreferredConstructor<T,P>` `discover(PersistentEntity<T,P> entity)` Discovers the `PreferredConstructorDiscoverer` for the given `PersistentEntity`.

### Method Detail

#### discover

    @Nullable
    static <T,P extends PersistentProperty<P>> PreferredConstructor<T,P> discover(Class<T> type)

Discovers the `PreferredConstructor` for the given type.

Parameters:
  `type` - must not be null.
Returns:
  the `PreferredConstructor` if found or null.

#### discover

    @Nullable
    static <T,P extends PersistentProperty<P>> PreferredConstructor<T,P> discover(PersistentEntity<T,P> entity)

Discovers the `PreferredConstructorDiscoverer` for the given `PersistentEntity`.

Parameters:
  `entity` - must not be null.
Returns:
  the `PreferredConstructor` if found or null.