Interface MetadataReaderFactory
- All Known Implementing Classes:
CachingMetadataReaderFactory, SimpleMetadataReaderFactory
public interface MetadataReaderFactory
Factory interface for
MetadataReader instances.
Allows for caching a MetadataReader per original resource.- Since:
- 2.5
- Author:
- Juergen Hoeller, Brian Clozel
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic MetadataReaderFactorycreate(@nullable ClassLoader classLoader) Create a defaultMetadataReaderFactoryimplementation that's suitable for the current JVM.static MetadataReaderFactorycreate(@nullable ResourceLoader resourceLoader) Create a defaultMetadataReaderFactoryimplementation that's suitable for the current JVM.getMetadataReader(String className) Obtain a MetadataReader for the given class name.getMetadataReader(Resource resource) Obtain a MetadataReader for the given resource.Return the ResourceLoader that this MetadataReaderFactory has been constructed with.
-
Method Details
-
getMetadataReader
Obtain a MetadataReader for the given class name.- Parameters:
className- the class name (to be resolved to a ".class" file)- Returns:
- a holder for the ClassReader instance (never
null) - Throws:
ClassFormatException- in case of an incompatible class formatIOException- in case of I/O failure
-
getMetadataReader
Obtain a MetadataReader for the given resource.- Parameters:
resource- the resource (pointing to a ".class" file)- Returns:
- a holder for the ClassReader instance (never
null) - Throws:
ClassFormatException- in case of an incompatible class formatIOException- in case of I/O failure
-
getResourceLoader
ResourceLoader getResourceLoader()Return the ResourceLoader that this MetadataReaderFactory has been constructed with.- Since:
- 7.0
-
create
Create a defaultMetadataReaderFactoryimplementation that's suitable for the current JVM.- Returns:
- a new factory instance
- Since:
- 7.0
-
create
Create a defaultMetadataReaderFactoryimplementation that's suitable for the current JVM.- Returns:
- a new factory instance
- Since:
- 7.0
-