ClassLoaders

object ClassLoaders

ClassLoaders load class,stream

class Object
trait Matchable
class Any

Value members

Concrete methods

def defaultClassLoader: ClassLoader

Return the default ClassLoader to use typically the thread context ClassLoader, if available; the ClassLoader that loaded the ClassLoaders class will be used as fallback.

Return the default ClassLoader to use typically the thread context ClassLoader, if available; the ClassLoader that loaded the ClassLoaders class will be used as fallback.

Returns

the default ClassLoader (never <code>null</code>)

def get(className: String, classLoader: ClassLoader): Option[Class[_]]
def getResource(resourceName: String, callingClass: Class[_]): Option[URL]

Load a given resource(Cannot start with slash /).

Load a given resource(Cannot start with slash /).

def getResourceAsStream(resourceName: String, callingClass: Class[_]): Option[InputStream]

This is a convenience method to load a resource as a stream.

This is a convenience method to load a resource as a stream.

The algorithm used to find the resource is given in getResource()

def getResources(resourceName: String, callingClass: Class[_]): List[URL]

Load list of resource(Cannot start with slash /).

Load list of resource(Cannot start with slash /).

Returns

List of resources url or empty list.

def load(className: String, classLoader: ClassLoader): Class[_]