Package io.github.toolfactory.jvm.util
Class ObjectProvider
java.lang.Object
io.github.toolfactory.jvm.util.ObjectProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectProvidergetExceptionHandler(Map<Object, Object> context) static <F> F<T> TgetOrBuildObject(Class<? super T> clazz, Map<Object, Object> context) boolean<T> booleanmarkToBeInitializedViaExceptionHandler(Class<? super T> clazz, Map<Object, Object> context) <T> booleanmarkToBeInitializedViaExceptionHandler(Class<? super T> clazz, Map<Object, Object> context, ObjectProvider.InitializationMarkViaExceptionHandler exception) static voidputIfAbsent(Map<Object, Object> context, Supplier<ObjectProvider> objectProvider) static voidsetExceptionHandler(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
-