Top Description Inners Fields Constructors Methods
bsh.classpath

public Class DiscreteFilesClassLoader

extends BshClassLoader
Class Inheritance
Imports
java.io.*, .File, java.util.*, java.awt.*, bsh.BshClassManager, bsh.classpath.BshClassPath.ClassSource, .BshClassPath.DirClassSource, .BshClassPath.GeneratedClassSource

A classloader which can load one or more classes from specified sources. Because the classes are loaded via a single classloader they change as a group and any versioning cross dependencies can be managed.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
pack-priv DiscreteFilesClassLoader.ClassSourceMap
map

Map of class sources which also implies our coverage space.

Inherited from bsh.classpath.BshClassLoader:
classManager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Class<T>
findClass(String
the name of the class
name
)

Overrides bsh.classpath.BshClassLoader.findClass.

Find the correct source for the class...
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from bsh.classpath.BshClassLoader:
addURLgetClassManagerloadClass

Field Detail

mapback to summary
pack-priv DiscreteFilesClassLoader.ClassSourceMap map

Map of class sources which also implies our coverage space.

Constructor Detail

DiscreteFilesClassLoaderback to summary
public DiscreteFilesClassLoader(BshClassManager classManager, DiscreteFilesClassLoader.ClassSourceMap map)

Method Detail

findClassback to summary
public Class<T> findClass(String name) throws ClassNotFoundException

Overrides bsh.classpath.BshClassLoader.findClass.

Doc from bsh.classpath.BshClassLoader.findClass.

Find the correct source for the class... Try designated loader if any Try our URLClassLoader paths if any Try base loader if any Try system ???

Parameters
name:String

Doc from java.net.URLClassLoader.findClass.

the name of the class

Returns:Class<T>

Doc from java.net.URLClassLoader.findClass.

the resulting class

Exceptions
ClassNotFoundException:

Doc from java.net.URLClassLoader.findClass.

if the class could not be found, or if the loader is closed.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

bsh.classpath back to summary

public Class DiscreteFilesClassLoader.ClassSourceMap

extends HashMap
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BshClassPath.ClassSource
get(String name)

public void
put(String
key with which the specified value is to be associated
name
,
BshClassPath.ClassSource
value to be associated with the specified key
source
)

Overrides java.util.HashMap.put.

Implements java.util.Map.put.

Associates the specified value with the specified key in this map.
Inherited from java.util.HashMap:
clearclonecomputecomputeIfAbsentcomputeIfPresentcontainsKeycontainsValueentrySetforEachgetgetOrDefaultisEmptykeySetmergenewHashMapputAllputIfAbsentremoveremovereplacereplacereplaceAllsizevalues

Constructor Detail

ClassSourceMapback to summary
public ClassSourceMap()

Method Detail

getback to summary
public BshClassPath.ClassSource get(String name)
putback to summary
public void put(String name, BshClassPath.ClassSource source)

Overrides java.util.HashMap.put.

Implements java.util.Map.put.

Doc from java.util.HashMap.put.

Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.

Parameters
name:String

key with which the specified value is to be associated

source:BshClassPath.ClassSource

value to be associated with the specified key

Returns:void

the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key.)