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, Xeno Amess
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
P extends PersistentProperty<P>>
PreferredConstructor<T,P> Discovers thePreferredConstructor
for the given type.static <T,
P extends PersistentProperty<P>>
PreferredConstructor<T,P> discover
(PersistentEntity<T, P> entity) Discovers thePreferredConstructorDiscoverer
for the givenPersistentEntity
.
-
Method Details
-
discover
@Nullable static <T,P extends PersistentProperty<P>> PreferredConstructor<T,P> discover(Class<T> type) Discovers thePreferredConstructor
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 thePreferredConstructorDiscoverer
for the givenPersistentEntity
.- Parameters:
entity
- must not be null.- Returns:
- the
PreferredConstructor
if found or null.
-