Class ObjectProvider
java.lang.Object
io.github.toolfactory.jvm.util.ObjectProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectProvidergetExceptionHandler(Map<Object, Object> context) static <F> Fprivate <F> FgetObjectInternal(Class<? super F> clazz, Map<Object, Object> context) <T> TgetOrBuildObject(Class<? super T> clazz, Map<Object, Object> context) private <T> TgetOrBuildObjectInternal(Class<? super T> clazz, Map<Object, Object> context) private voidinit(int... versions) boolean<T> booleanmarkToBeInitializedViaExceptionHandler(Class<? super T> clazz, Map<Object, Object> context) <T> booleanmarkToBeInitializedViaExceptionHandler(Class<? super T> clazz, Map<Object, Object> context, ObjectProvider.InitializationMarkViaExceptionHandler exception) (package private) booleanputClassNameOptionalItem(List<String> classNameOptionalItems, String value) static voidputIfAbsent(Map<Object, Object> context, Supplier<ObjectProvider> objectProvider) (package private) Collection<String> retrieveAllClassNameCombinations(List<String> classNameItems, String separator) private <T> Class<? super T> retrieveClass(List<String> classNameItems, Collection<String> notFoundClasses, String separator) static voidsetExceptionHandler(Map<Object, Object> context, ObjectProvider.ExceptionHandler exceptionHandler)
-
Field Details
-
classNameItems
-
jVMVendorToClassSuffix
-
CLASS_NAME
-
jVMVersion
private int jVMVersion -
vendor
-
-
Constructor Details
-
ObjectProvider
public ObjectProvider(int... versions)
-
-
Method Details
-
init
private void init(int... versions) -
getOrBuildObject
-
putClassNameOptionalItem
-
getOrBuildObjectInternal
private <T> T getOrBuildObjectInternal(Class<? super T> clazz, Map<Object, Object> context) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException -
retrieveClass
private <T> Class<? super T> retrieveClass(List<String> classNameItems, Collection<String> notFoundClasses, String separator) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
retrieveAllClassNameCombinations
-
getObjectInternal
-
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
-