public class ModuleManager extends Object
Constructor and Description |
---|
ModuleManager() |
Modifier and Type | Method and Description |
---|---|
Optional<FunctionDefinition> |
getFunctionDefinition(String name)
Get an optional of
FunctionDefinition by a given name. |
Set<String> |
listFunctions()
Get names of all functions from all modules.
|
List<String> |
listModules()
Get names of all modules loaded.
|
void |
loadModule(String name,
Module module)
Load a module under a unique name.
|
void |
unloadModule(String name)
Unload a module with given name.
|
public void loadModule(String name, Module module)
name
- name of the modulemodule
- the module instancepublic void unloadModule(String name)
name
- name of the modulepublic List<String> listModules()
public Set<String> listFunctions()
public Optional<FunctionDefinition> getFunctionDefinition(String name)
FunctionDefinition
by a given name. Function will be resolved to
modules in the loaded order, and the first match will be returned. If no match is found in
all modules, return an optional.name
- name of the functionFunctionDefinition
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.