Package net.orbyfied.coldlib
Class ColdLibProvider
java.lang.Object
net.orbyfied.coldlib.ColdLibProvider
Responsible for loading, bootstrapping
and providing ColdLib to the VM.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidenable()Enables the library provider.static ColdLibProviderget()Get the library provider instance.static ColdLibGet the library instance.net.orbyfied.j8.util.logging.EventLoggetLog()Get the main event log.net.orbyfied.j8.util.logging.EventLogsGet the main event log group.protected voidinit()instance()Get the library instance.protected voidload()Loads the library provider.static <P extends ColdLibProvider>
PsetInstance(P provider) Set the provider instance.protected voidunload()Unloads the library provider.
-
Field Details
-
lib
The library instance. -
logGroup
protected net.orbyfied.j8.util.logging.EventLogs logGroupThe library event log group. -
log
protected net.orbyfied.j8.util.logging.EventLog logThe main library log.
-
-
Constructor Details
-
ColdLibProvider
public ColdLibProvider()
-
-
Method Details
-
setInstance
Set the provider instance. Will error if it has already been provided.- Parameters:
provider- The provider.- Throws:
UnsupportedOperationException- If a provider has already been set.
-
get
Get the library provider instance.- Returns:
- The provider or null if uninitialized.
-
getLibrary
Get the library instance.- Returns:
- The library instance.
- Throws:
IllegalStateException- If no ColdLib provider has been set.
-
init
protected void init() -
instance
Get the library instance.- Returns:
- The library instance.
-
getLog
public net.orbyfied.j8.util.logging.EventLog getLog()Get the main event log.- Returns:
- The event log.
-
getLogGroup
public net.orbyfied.j8.util.logging.EventLogs getLogGroup()Get the main event log group.- Returns:
- The event log group.
-
load
protected void load()Loads the library provider. -
enable
protected void enable()Enables the library provider. -
unload
protected void unload()Unloads the library provider.
-