Package elki.utilities
Class ELKIServiceLoader
- java.lang.Object
-
- elki.utilities.ELKIServiceLoader
-
public class ELKIServiceLoader extends java.lang.Object
Class that emulates the behavior of an java ServiceLoader, except that the classes are not automatically instantiated. This is more lazy, but also we need to do the instantiations our way with the parameterizable API.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description static char
COMMENT_CHAR
Comment characterstatic java.lang.String
FILENAME_PREFIX
File name prefix for the ELKI functionality discovery.static java.lang.String
RESOURCE_PREFIX
Resource name prefix for the ELKI functionality discovery.
-
Constructor Summary
Constructors Modifier Constructor Description private
ELKIServiceLoader()
Constructor - do not use.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
load(java.lang.Class<?> parent)
Load the service file.static void
load(java.lang.Class<?> parent, java.lang.ClassLoader cl)
Load the service file.private static void
parseLine(java.lang.Class<?> parent, char[] line, int begin, int end)
Parse a single line from a service registry file.
-
-
-
Field Detail
-
RESOURCE_PREFIX
public static final java.lang.String RESOURCE_PREFIX
Resource name prefix for the ELKI functionality discovery.Note: resources are always separated with /, even on Windows.
- See Also:
- Constant Field Values
-
FILENAME_PREFIX
public static final java.lang.String FILENAME_PREFIX
File name prefix for the ELKI functionality discovery.
-
COMMENT_CHAR
public static final char COMMENT_CHAR
Comment character- See Also:
- Constant Field Values
-
-
Method Detail
-
load
public static void load(java.lang.Class<?> parent)
Load the service file.
-
load
public static void load(java.lang.Class<?> parent, java.lang.ClassLoader cl)
Load the service file.
-
parseLine
private static void parseLine(java.lang.Class<?> parent, char[] line, int begin, int end)
Parse a single line from a service registry file.- Parameters:
parent
- Parent classline
- Line to read
-
-