|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.type.classreading.SimpleMetadataReaderFactory org.springframework.core.type.classreading.CachingMetadataReaderFactory
public class CachingMetadataReaderFactory
Caching implementation of the MetadataReaderFactory
interface,
caching MetadataReader
per Spring Resource
handle
(i.e. per ".class" file).
Field Summary | |
---|---|
static int |
DEFAULT_CACHE_LIMIT
Default maximum number of entries for the MetadataReader cache: 256 |
Constructor Summary | |
---|---|
CachingMetadataReaderFactory()
Create a new CachingMetadataReaderFactory for the default class loader. |
|
CachingMetadataReaderFactory(ClassLoader classLoader)
Create a new CachingMetadataReaderFactory for the given class loader. |
|
CachingMetadataReaderFactory(ResourceLoader resourceLoader)
Create a new CachingMetadataReaderFactory for the given resource loader. |
Method Summary | |
---|---|
int |
getCacheLimit()
Return the maximum number of entries for the MetadataReader cache. |
MetadataReader |
getMetadataReader(Resource resource)
Obtain a MetadataReader for the given resource. |
void |
setCacheLimit(int cacheLimit)
Specify the maximum number of entries for the MetadataReader cache. |
Methods inherited from class org.springframework.core.type.classreading.SimpleMetadataReaderFactory |
---|
getMetadataReader, getResourceLoader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_CACHE_LIMIT
Constructor Detail |
---|
public CachingMetadataReaderFactory()
public CachingMetadataReaderFactory(ResourceLoader resourceLoader)
resourceLoader
- the Spring ResourceLoader to use
(also determines the ClassLoader to use)public CachingMetadataReaderFactory(ClassLoader classLoader)
classLoader
- the ClassLoader to useMethod Detail |
---|
public void setCacheLimit(int cacheLimit)
public int getCacheLimit()
public MetadataReader getMetadataReader(Resource resource) throws IOException
MetadataReaderFactory
getMetadataReader
in interface MetadataReaderFactory
getMetadataReader
in class SimpleMetadataReaderFactory
resource
- the resource (pointing to a ".class" file)
null
)
IOException
- in case of I/O failure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |