Module org.htmlunit.corejs
Class AbstractCacheFactory
java.lang.Object
org.htmlunit.corejs.javascript.lc.type.impl.factory.AbstractCacheFactory
- All Implemented Interfaces:
Serializable,FactoryBase,TypeInfoFactory
- Direct Known Subclasses:
ClassValueCacheFactory,LegacyCacheFactory
TypeInfoFactory implementation with cache. The exact characteristic if the factory
depends on the characteristic of map backend created via initCache()
This factory is serializable, but none of its cached objects will be serialized.
- Author:
- ZZZank
- See Also:
-
Field Summary
Fields inherited from interface org.htmlunit.corejs.javascript.lc.type.TypeInfoFactory
EMPTY_ARRAY, GLOBAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(TypeVariable<?> typeVariable) <K,V> Map<K, V> getConsolidationMapping(Class<?> from) Get consolidation mapping from the input class.protected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.htmlunit.corejs.javascript.lc.type.impl.factory.FactoryBase
attachParam, computeConsolidationMapping, create, create, create, toArrayMethods inherited from interface org.htmlunit.corejs.javascript.lc.type.TypeInfoFactory
associate, attachParam, consolidateType, create, create, createArray, createList
-
Constructor Details
-
AbstractCacheFactory
public AbstractCacheFactory()
-
-
Method Details
-
initCache
protected void initCache() -
create
- Specified by:
createin interfaceTypeInfoFactory
-
getConsolidationMapping
Description copied from interface:TypeInfoFactoryGet consolidation mapping from the input class.Example (for factory implemented by Rhino):
class
and input class isA<Ta>{} classB<Tb>extendsA<Tb>{} interfaceC<Tc>{} interfaceD<Td>extendsC<Td>{} classE<Te>extendsB<Te>implementsD<String>{}E.class. The result mapping will then be:Ta -> Te,Tb -> Te,Tc -> String,Td -> String- Specified by:
getConsolidationMappingin interfaceTypeInfoFactory- See Also:
-
createCache
-