public class PluginLoader
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PluginLoader.JarMetadata |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMPONENT_SCOPE_SEPARATOR |
| Constructor and Description |
|---|
PluginLoader(java.lang.String jarFile,
boolean builtIn)
Constructs a algorithm loader object with the location of the jar files.
|
PluginLoader(java.net.URL jarFile,
boolean builtIn)
Constructs a algorithm loader object with the location of the jar files.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<MaskingComponent> |
discoverAlgorithms()
Discovers the MaskingAlgorithm classes in the jar file location.
|
MaskingComponent |
instantiateComponent(java.lang.String className) |
boolean |
isBuiltIn() |
public static final java.lang.String COMPONENT_SCOPE_SEPARATOR
public PluginLoader(java.lang.String jarFile,
boolean builtIn)
throws java.io.IOException
jarFile - String file name of the JAR file, or directory containing exactly one JAR file.builtIn - Whether the plugin is buildIn, granting it extra privilegesjava.io.IOException - Throws exception if there is any error in reading the jar file.public PluginLoader(java.net.URL jarFile,
boolean builtIn)
throws java.io.IOException
jarFile - URL of the jar file.builtIn - Whether the plugin is buildIn, granting it extra privilegesjava.io.IOException - Throws exception if there is any error in reading the jar file.public MaskingComponent instantiateComponent(java.lang.String className) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
java.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionpublic java.util.Set<MaskingComponent> discoverAlgorithms()
DuplicateComponentNameException - if two algorithms in the jar have same name.public boolean isBuiltIn()