public interface Library
Modifier and Type | Interface and Description |
---|---|
static interface |
Library.Required |
static interface |
Library.TYPE
Constant definitions for library types.
|
Modifier and Type | Method and Description |
---|---|
void |
doRegistration() |
java.lang.Class |
getLibrary()
Returns the
Library class this library is related to. |
int |
getPriority()
Returns a priority number to range this implementation in case multiple
ones are within the libraries initialization.
|
java.util.Set<Library.Required> |
getRequireds()
Returns a Set of required libraries and their types.
|
java.lang.String |
getType()
Returns the type of the Library.
|
void |
initialize()
Performs all the initializations of the library, only related to himself:
register implementation classes through the Locator, start services, etc.
|
boolean |
isRequired(java.lang.Class libClass)
Returns if a given library class is required.
|
boolean |
isRequired(Library lib)
Returns if a given library is required.
|
void |
postInitialize()
Performs all the initializations or validations related to the library
dependencies, as getting references to objects through other libraries
Locators.
|
void |
require(java.lang.Class library) |
void |
require(java.util.Collection<Library.Required> libraries) |
void initialize() throws LibraryException
LibraryException
- if there is an error while performing the
initialization of the libraryvoid postInitialize() throws LibraryException
LibraryException
- if there is an error while loading an
implementation of the libraryjava.lang.Class getLibrary()
Library
class this library is related to.Library
class this library is related tojava.lang.String getType()
TYPE.
java.util.Set<Library.Required> getRequireds()
boolean isRequired(Library lib)
lib
- the library to check if it is requiredboolean isRequired(java.lang.Class libClass)
libClass
- the library Class to check if it is requiredint getPriority()
void doRegistration()
void require(java.lang.Class library)
void require(java.util.Collection<Library.Required> libraries)