java.lang.Object
org.mozilla.javascript.lc.type.impl.factory.WithCacheFactory
- All Implemented Interfaces:
Serializable,FactoryBase,TypeInfoFactory
- Direct Known Subclasses:
ConcurrentFactory,WeakReferenceFactory
TypeInfoFactory implementation with cache. The exact
characteristic if the factory depends on the characteristic of map backend created via createTypeCache()
This factory is serializable, but none of its cached objects will be serialized.
- See Also:
-
Field Summary
Fields inherited from interface org.mozilla.javascript.lc.type.TypeInfoFactory
EMPTY_ARRAY, GLOBAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(TypeVariable<?> typeVariable) protected abstract <K,V> Map <K, V> protected abstract <K,V> Map <K, V> getConsolidationMapping(Class<?> from) Get consolidation mapping from the input class.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.mozilla.javascript.lc.type.impl.factory.FactoryBase
attachParam, computeConsolidationMapping, create, create, create, toArrayMethods inherited from interface org.mozilla.javascript.lc.type.TypeInfoFactory
associate, attachParam, consolidateType, create, createArray, createList
-
Constructor Details
-
WithCacheFactory
public WithCacheFactory()
-
-
Method Details
-
createTypeCache
-
createConsolidationMappingCache
-
create
- Specified by:
createin interfaceTypeInfoFactory
-
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:
-