Package io.github.toolfactory.jvm.util
Class ObjectProvider
java.lang.Object
io.github.toolfactory.jvm.util.ObjectProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static interface
static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectProvider
getExceptionHandler
(Map<Object, Object> context) static <F> F
<T> T
getOrBuildObject
(Class<? super T> clazz, Map<Object, Object> context) boolean
<T> boolean
markToBeInitializedViaExceptionHandler
(Class<? super T> clazz, Map<Object, Object> context) <T> boolean
markToBeInitializedViaExceptionHandler
(Class<? super T> clazz, Map<Object, Object> context, ObjectProvider.InitializationMarkViaExceptionHandler exception) static void
putIfAbsent
(Map<Object, Object> context, Supplier<ObjectProvider> objectProvider) static void
setExceptionHandler
(Map<Object, Object> context, ObjectProvider.ExceptionHandler exceptionHandler)
-
Constructor Details
-
ObjectProvider
public ObjectProvider(int... versions)
-
-
Method Details
-
getOrBuildObject
-
getObject
-
get
-
putIfAbsent
-
markToBeInitializedViaExceptionHandler
-
markToBeInitializedViaExceptionHandler
public <T> boolean markToBeInitializedViaExceptionHandler(Class<? super T> clazz, Map<Object, Object> context, ObjectProvider.InitializationMarkViaExceptionHandler exception) -
isMarkedToBeInitializedViaExceptionHandler
public boolean isMarkedToBeInitializedViaExceptionHandler(ObjectProvider.BuildingException exception) -
setExceptionHandler
public static void setExceptionHandler(Map<Object, Object> context, ObjectProvider.ExceptionHandler exceptionHandler) -
getExceptionHandler
-