public class WeakReferenceFactory extends WithCacheFactory
TypeInfoFactory implementation with a thread-safe (synchronized), weak-reference cache.
This factory will cache TypeInfo for simple types. Passing simple type (TypeInfoFactory.class for example) to this factory multiple times will return the exactly same
TypeInfo object.
This factory uses a weak-reference cache. Resolving a type will not prevent it from getting reclaimed by JVM.
This factory is thread safe. Multiple threads can safely access the same WeakReferenceFactory object at the same time, but it's not guaranteed to be performant.
This factory is serializable, but none of its cached objects will be serialized.
factory with no cache,
factory with a strong-reference, high performance cache,
Serialized FormEMPTY_ARRAY, GLOBAL, NO_CACHE| Constructor and Description |
|---|
WeakReferenceFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected <K,V> Map<K,V> |
createTypeCache() |
create, createclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitattachParam, create, create, create, toArrayassociate, attachParam, create, createArray, createList, get, getConsolidationMapping, getOrElse, matchPredefinedprotected final <K,V> Map<K,V> createTypeCache()
createTypeCache in class WithCacheFactoryCopyright © 2025 HtmlUnit. All rights reserved.