All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.tck.config.SimpleResourceLoader Maven / Gradle / Ivy

The newest version!
package org.hibernate.tck.config;

import java.io.IOException;
import java.net.URL;

class SimpleResourceLoader
{
   
   public Class classForName(String name)
   {
      
      try
      {
         return Class.forName(name);
      }
      catch (ClassNotFoundException e)
      {
         throw new ResourceLoadingException(e);
      }
      catch (NoClassDefFoundError e)
      {
         throw new ResourceLoadingException(e);
      }
   }
   
   public URL getResource(String name)
   {
      return getClass().getResource(name);
   }
   
   public Iterable getResources(String name)
   {
      try
      {
         return new EnumerationIterable(getClass().getClassLoader().getResources(name));
      }
      catch (IOException e)
      {
         throw new ResourceLoadingException(e);
      }
   }
   
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy