类 ConcurrentReferenceCachingMetadataReaderFactory
java.lang.Object
cn.taketoday.core.type.classreading.SimpleMetadataReaderFactory
cn.taketoday.core.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory
- 所有已实现的接口:
MetadataReaderFactory
Caching implementation of the
MetadataReaderFactory interface backed by a
ConcurrentReferenceHashMap, caching MetadataReader per Framework
Resource handle (i.e. per ".class" file).- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Harry Yang 2021/11/26 21:51
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明Create a newConcurrentReferenceCachingMetadataReaderFactoryinstance for the default class loader.ConcurrentReferenceCachingMetadataReaderFactory(ResourceLoader resourceLoader) Create a newConcurrentReferenceCachingMetadataReaderFactoryinstance for the given resource loader.Create a newConcurrentReferenceCachingMetadataReaderFactoryinstance for the given class loader. -
方法概要
修饰符和类型方法说明voidClear the entire MetadataReader cache, removing all cached class metadata.protected MetadataReadercreateMetadataReader(Resource resource) Create the meta-data reader.getMetadataReader(Resource resource) Obtain a MetadataReader for the given resource.从类继承的方法 cn.taketoday.core.type.classreading.SimpleMetadataReaderFactory
getMetadataReader, getResourceLoader
-
字段详细资料
-
cache
-
-
构造器详细资料
-
ConcurrentReferenceCachingMetadataReaderFactory
public ConcurrentReferenceCachingMetadataReaderFactory()Create a newConcurrentReferenceCachingMetadataReaderFactoryinstance for the default class loader. -
ConcurrentReferenceCachingMetadataReaderFactory
Create a newConcurrentReferenceCachingMetadataReaderFactoryinstance for the given resource loader.- 参数:
resourceLoader- the ResourceLoader to use (also determines the ClassLoader to use)
-
ConcurrentReferenceCachingMetadataReaderFactory
Create a newConcurrentReferenceCachingMetadataReaderFactoryinstance for the given class loader.- 参数:
classLoader- the ClassLoader to use
-
-
方法详细资料
-
getMetadataReader
从接口复制的说明:MetadataReaderFactoryObtain a MetadataReader for the given resource.- 指定者:
getMetadataReader在接口中MetadataReaderFactory- 覆盖:
getMetadataReader在类中SimpleMetadataReaderFactory- 参数:
resource- the resource (pointing to a ".class" file)- 返回:
- a holder for the ClassReader instance (never
null) - 抛出:
IOException- in case of I/O failureClassFormatException- in case of an incompatible class format
-
createMetadataReader
Create the meta-data reader.- 参数:
resource- the source resource.- 返回:
- the meta-data reader
- 抛出:
IOException- on error
-
clearCache
public void clearCache()Clear the entire MetadataReader cache, removing all cached class metadata.
-