Package org.hibernate.models.internal
Class SimpleClassLoading
java.lang.Object
org.hibernate.models.internal.SimpleClassLoading
- All Implemented Interfaces:
Serializable,ClassLoading
ClassLoading which simply uses our ClassLoader directly
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Class<T> classForName(String name) Obtain aClassreference by name<T> Class<T> findClassForName(String name) Like ClassLoading.classForName(String), except here we simply returnnullif there is not a matching class.<S> Collection<S> loadJavaServices(Class<S> serviceType) Discovers and instantiates implementations of the givenJava servicecontract.locateResource(String resourceName) Locate a resource by name
-
Field Details
-
SIMPLE_CLASS_LOADING
-
-
Constructor Details
-
SimpleClassLoading
public SimpleClassLoading()
-
-
Method Details
-
classForName
Description copied from interface:ClassLoadingObtain aClassreference by name- Specified by:
classForNamein interfaceClassLoading- Parameters:
name- The name of the class- Returns:
- The
Classobject with the given name
-
findClassForName
Description copied from interface:ClassLoadingLike ClassLoading.classForName(String), except here we simply returnnullif there is not a matching class. This is often useful, e.g., when looking for a package-info.- Specified by:
findClassForNamein interfaceClassLoading
-
locateResource
Description copied from interface:ClassLoadingLocate a resource by name- Specified by:
locateResourcein interfaceClassLoading- Parameters:
resourceName- The name of the resource to resolve- Returns:
- The located resource;
may return
nullto indicate the resource was not found
-
loadJavaServices
Description copied from interface:ClassLoadingDiscovers and instantiates implementations of the givenJava servicecontract.- Specified by:
loadJavaServicesin interfaceClassLoading- Type Parameters:
S- The type of the service contract- Parameters:
serviceType- The java type defining the service contract- Returns:
- The ordered set of discovered services.
-