public enum NoCacheFactory extends Enum<NoCacheFactory> implements FactoryBase
TypeInfoFactory implementation with no cache.
This factory will not cache TypeInfo. But passing a type to this factory multiple
times might still return the exact same object, they are predefined static TypeInfo.
Resolving a type will not prevent it from getting reclaimed by JVM, obviously.
This factory is thread-safe, as it's stateless.
factory with a strong-reference, high performance cache,
factory with a weak-reference cache| Enum Constant and Description |
|---|
INSTANCE |
EMPTY_ARRAY, GLOBAL, NO_CACHE| Modifier and Type | Method and Description |
|---|---|
TypeInfo |
create(Class<?> clazz) |
TypeInfo |
create(TypeVariable<?> typeVariable) |
Map<VariableTypeInfo,TypeInfo> |
getConsolidationMapping(Class<?> from)
Get consolidation mapping from the input class.
|
static NoCacheFactory |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NoCacheFactory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfattachParam, computeConsolidationMapping, create, create, create, extractSuperMapping, toArrayassociate, attachParam, consolidateAll, consolidateType, create, createArray, createList, get, getOrElse, matchPredefined, transformMappingpublic static final NoCacheFactory INSTANCE
public static NoCacheFactory[] values()
for (NoCacheFactory c : NoCacheFactory.values()) System.out.println(c);
public static NoCacheFactory valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic 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.