Interface PreferredConstructorDiscoverer
public interface PreferredConstructorDiscoverer
Helper class to find a
PreferredConstructor.- Author:
- Oliver Gierke, Christoph Strobl, Roman Rodov, Mark Paluch, Xeno Amess
-
Nested Class Summary
Nested Classes -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T, P extends PersistentProperty<P>>
@Nullable PreferredConstructor<T, P> Discovers thePreferredConstructorfor the given type.static <T, P extends PersistentProperty<P>>
@Nullable PreferredConstructor<T, P> discover(PersistentEntity<T, P> entity) Discovers thePreferredConstructorDiscovererfor the givenPersistentEntity.
-
Method Details
-
discover
static <T, P extends PersistentProperty<P>> @Nullable PreferredConstructor<T,P> discover(Class<T> type) Discovers thePreferredConstructorfor the given type.- Parameters:
type- must not be null.- Returns:
- the
PreferredConstructorif found or null.
-
discover
static <T, P extends PersistentProperty<P>> @Nullable PreferredConstructor<T,P> discover(PersistentEntity<T, P> entity) Discovers thePreferredConstructorDiscovererfor the givenPersistentEntity.- Parameters:
entity- must not be null.- Returns:
- the
PreferredConstructorif found or null.
-