public abstract class WithCacheFactory extends Object implements FactoryBase
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.
EMPTY_ARRAY, GLOBAL, NO_CACHE| Constructor and Description |
|---|
WithCacheFactory() |
| Modifier and Type | Method and Description |
|---|---|
TypeInfo |
create(Class<?> clazz) |
TypeInfo |
create(TypeVariable<?> typeVariable) |
protected abstract <K,V> Map<K,V> |
createConsolidationMappingCache() |
protected abstract <K,V> Map<K,V> |
createTypeCache() |
Map<VariableTypeInfo,TypeInfo> |
getConsolidationMapping(Class<?> from)
Get consolidation mapping from the input class.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitattachParam, computeConsolidationMapping, create, create, create, extractSuperMapping, toArrayassociate, attachParam, consolidateAll, consolidateType, create, createArray, createList, get, getOrElse, matchPredefined, transformMappingprotected abstract <K,V> Map<K,V> createTypeCache()
protected abstract <K,V> Map<K,V> createConsolidationMappingCache()
public TypeInfo create(Class<?> clazz)
create in interface TypeInfoFactorypublic TypeInfo create(TypeVariable<?> typeVariable)
create in interface TypeInfoFactorypublic Map<VariableTypeInfo,TypeInfo> getConsolidationMapping(Class<?> from)
TypeInfoFactoryExample (for factory implemented by Rhino):
classand 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 -> StringgetConsolidationMapping in interface TypeInfoFactoryTypeInfo.consolidate(Map)Copyright © 2025 HtmlUnit. All rights reserved.