ClassLoaders

org.beangle.commons.lang.ClassLoaders
object ClassLoaders

ClassLoaders load class,stream

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

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.

Attributes

Returns

the default ClassLoader (never null)

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 /).

Attributes

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()

Attributes

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

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

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

Attributes

Returns

List of resources url or empty list.

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