public abstract class UnitLoader
extends Object
Unit
,
LocalUnitLoader
,
SharedUnitLoader
Modifier and Type | Class and Description |
---|---|
static class |
UnitLoader.StoredExtension
The Class StoredExtension.
|
Constructor and Description |
---|
UnitLoader()
Instantiates a new UnitLoader.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtension(ExtensionModule ext)
Adds the ExtensionModule.
|
void |
free()
Frees the memory.
|
Map<String,String> |
getAddedJars()
Gets the map of the added jars.
|
List<ExtensionModule> |
getExtensions()
Gets the list of extensions.
|
Unit<?> |
getUnit(Class<?> objClass)
Gets the Unit by class.
|
abstract Unit<?> |
getUnit(String unitClass)
Gets the Unit by unitClass.
|
List<Unit<?>> |
getUnits()
Gets the list of units.
|
void |
load(Collection<Unit<?>> units,
FilterContext filterContext)
Loads all extensions for the collection of units.
|
void |
load(FilterContext filterContext)
Loads all extensions for the registered units.
|
void |
loadOthers(String classPath,
FilterContext filterContext)
Loads all extensions for the units located in the classPath.
|
void |
register(Unit<?> unit,
String path,
String jarPath)
Registers unit, using provided path and jar path.
|
Collection<Unit<?>> |
registerAll(String path,
String jarPath,
String classPath,
FilterContext filterContext)
Registers all units.
|
public void addExtension(ExtensionModule ext)
ext
- the ExtensionModulepublic void free()
public Map<String,String> getAddedJars()
public List<ExtensionModule> getExtensions()
public Unit<?> getUnit(Class<?> objClass)
objClass
- the classpublic abstract Unit<?> getUnit(String unitClass) throws Exception
unitClass
- the unit classException
- in case of any errorpublic List<Unit<?>> getUnits()
public void load(Collection<Unit<?>> units, FilterContext filterContext)
units
- the collection of unitsfilterContext
- the FilterContextFilter
public void load(FilterContext filterContext)
filterContext
- the FilterContextpublic void loadOthers(String classPath, FilterContext filterContext)
classPath
- the class pathfilterContext
- the filter contextpublic void register(Unit<?> unit, String path, String jarPath)
unit
- the unitpath
- the pathjarPath
- the jar pathpublic Collection<Unit<?>> registerAll(String path, String jarPath, String classPath, FilterContext filterContext)
path
- the pathjarPath
- the jar pathclassPath
- the class pathfilterContext
- the filter contextCopyright © 2010-2020 Toolsverse. All Rights Reserved.