Class ConstructorCache
java.lang.Object
software.amazon.awssdk.checksums.internal.ConstructorCache
A cache that stores classes and exposes a method to retrieve its zero-argument constructor.
This cache stores weak references to loaded classes, allowing them to be garbage collected at any point.
Classes are loaded by first attempting to load it via the thread context ClassLoader
(or system ClassLoader
if
the calling thread does not have one). If that fails, it will attempt using the ClassLoader
that loaded
ClassLoaderHelper
.
If a class or its zero-argument constructor cannot be found, an empty result is returned.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional
<Constructor<?>> getConstructor
(String className) Retrieve the zero-argument constructor for the given class name.
-
Constructor Details
-
ConstructorCache
public ConstructorCache()
-
-
Method Details
-
getConstructor
Retrieve the zero-argument constructor for the given class name. Returns an empty result if no such constructor is found.
-