Class ColdLibProvider

java.lang.Object
net.orbyfied.coldlib.ColdLibProvider

public abstract class ColdLibProvider extends Object
Responsible for loading, bootstrapping and providing ColdLib to the VM.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected ColdLib
    The library instance.
    protected net.orbyfied.j8.util.logging.EventLog
    The main library log.
    protected net.orbyfied.j8.util.logging.EventLogs
    The library event log group.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Enables the library provider.
    get()
    Get the library provider instance.
    static ColdLib
    Get the library instance.
    net.orbyfied.j8.util.logging.EventLog
    Get the main event log.
    net.orbyfied.j8.util.logging.EventLogs
    Get the main event log group.
    protected void
     
    Get the library instance.
    protected void
    Loads the library provider.
    static <P extends ColdLibProvider>
    P
    setInstance(P provider)
    Set the provider instance.
    protected void
    Unloads the library provider.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • lib

      protected ColdLib lib
      The library instance.
    • logGroup

      protected net.orbyfied.j8.util.logging.EventLogs logGroup
      The library event log group.
    • log

      protected net.orbyfied.j8.util.logging.EventLog log
      The main library log.
  • Constructor Details

    • ColdLibProvider

      public ColdLibProvider()
  • Method Details

    • setInstance

      public static <P extends ColdLibProvider> P setInstance(P provider)
      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

      public static ColdLibProvider get()
      Get the library provider instance.
      Returns:
      The provider or null if uninitialized.
    • getLibrary

      public static ColdLib getLibrary()
      Get the library instance.
      Returns:
      The library instance.
      Throws:
      IllegalStateException - If no ColdLib provider has been set.
    • init

      protected void init()
    • instance

      public ColdLib 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.