Package dev.morphia.internal
Class MorphiaInternals
- java.lang.Object
-
- dev.morphia.internal.MorphiaInternals
-
public final class MorphiaInternals extends Object
- Since:
- 2.2
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MorphiaInternals.DriverVersion
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
proxyClassesPresent()
Checks that the dependencies to support lazy proxies are presentstatic <V> V
tryInvoke(MorphiaInternals.DriverVersion version, Supplier<V> block)
static <V> V
tryInvoke(MorphiaInternals.DriverVersion version, Supplier<V> block, Supplier<V> fallback)
-
-
-
Method Detail
-
proxyClassesPresent
public static boolean proxyClassesPresent()
Checks that the dependencies to support lazy proxies are present- Returns:
- true the dependencies are found
-
tryInvoke
@Nullable public static <V> V tryInvoke(MorphiaInternals.DriverVersion version, Supplier<V> block)
- Parameters:
version
- the required mininum versionblock
-- Returns:
-
tryInvoke
public static <V> V tryInvoke(MorphiaInternals.DriverVersion version, Supplier<V> block, Supplier<V> fallback)
- Parameters:
version
- the required mininum versionblock
-- Returns:
-
-