Class Loader
java.lang.Object
de.uni_hildesheim.sse.easy.loader.AbstractLoader
de.uni_hildesheim.sse.easy.loader.Loader
- All Implemented Interfaces:
ILoader
The standalone loader class. Basically, it emulates some very core functions of OSGi/Equinox and
Eclipse Declarative Services to dynamically determine the bundle depedency hierarchy, the activators (although
standalone EASy core bundles shall not have activators) and the dynamic initializers expressed as Declarative
Services. Currently, due to the design of EASy, this Loader just ignores the class loader separation performed by
OSGi and loads all classes into the same Classloader.
- Author:
- Holger Eichelberger
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<BundleInfo> private ClassLoaderprivate ClassLoaderFields inherited from class de.uni_hildesheim.sse.easy.loader.AbstractLoader
EASY_EXCLUSION_PATTERN, EASY_INCLUSION_PATTERN, TAG_EASY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBootstraps EASy.voidexecuteCommand(String arg) Executes a user command.loadAndInitialize(List<URL> urls, List<BundleInfo> infos) Loads and initializes the bundles.static voidStarts the loader for testing.private voidprintBootstrapData(List<URL> urls, List<BundleInfo> instantiate) Prints the bootstrap data.voidsetLoader(ClassLoader loader) Sets the class loader for loading EASy bundles.voidsetVerbose(boolean verbose) Changes the verbosity mode.voidshutdown()Performs EASy shutdown activities.voidstartup()Performs EASy startup activities.Methods inherited from class de.uni_hildesheim.sse.easy.loader.AbstractLoader
bootstrap, collectBootstrapData, genericBootstrap, getBase, getUiBundles, initializeRegistry, irrelevantInJar, notifyMapping, printDependencies, simpleBootstrap
-
Field Details
-
data
-
loader
-
parentLoader
-
-
Constructor Details
-
Loader
public Loader()Creates a new loader with default base ".". -
Loader
Creates a new loader.- Parameters:
base- the base folder where the plugins are located in
-
-
Method Details
-
startup
public void startup()Description copied from interface:ILoaderPerforms EASy startup activities. -
main
Starts the loader for testing.- Parameters:
args- ignored
-
bootstrap
Bootstraps EASy.- Parameters:
jarToExecute- an optional URL containing executable code
-
executeCommand
Executes a user command.- Parameters:
arg- the argument for the command.- Throws:
CommandExecutionException- in case that execution fails
-
loadAndInitialize
Loads and initializes the bundles.- Parameters:
urls- the URLs of the jars to be turned into a class loaderinfos- the bundles to be initialized- Returns:
- the class loader if successful, null else
-
shutdown
public void shutdown()Description copied from interface:ILoaderPerforms EASy shutdown activities. -
printBootstrapData
Prints the bootstrap data.- Parameters:
urls- the jar files to load (modified as a side effect)instantiate- the bundles to instantiate, either via activator or DS (modified as a side effect)
-
setVerbose
public void setVerbose(boolean verbose) Description copied from interface:ILoaderChanges the verbosity mode.- Specified by:
setVerbosein interfaceILoader- Parameters:
verbose- shall we be verbose?
-
setLoader
Description copied from interface:ILoaderSets the class loader for loading EASy bundles. By default, the class loader of the implementing class is used.
-