Package org.hibernate.boot.spi
Interface ClassLoaderAccess
- All Known Implementing Classes:
ClassLoaderAccessImpl
,ClassLoaderAccessLazyImpl
,ClassLoaderAccessTestingImpl
public interface ClassLoaderAccess
During the process of building the metamodel, access to the
ClassLoader
is
strongly discouraged. However, sometimes it is needed. This contract helps mitigate
access to the ClassLoader
in these cases.- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescription<T> Class<T>
classForName
(String name) Obtain aClass
reference by namelocateResource
(String resourceName) Locate a resource by name
-
Method Details
-
classForName
Obtain aClass
reference by name- Parameters:
name
- The name of the class- Returns:
- The
Class
object with the given name
-
locateResource
Locate a resource by name- Parameters:
resourceName
- The name of the resource to resolve- Returns:
- The located resource;
may return
null
to indicate the resource was not found
-