Class Services

java.lang.Object
com.dashtiss.tpsnitch.platform.Services

public class Services extends Object
Provides access to platform-specific services for TPSnitch. Uses Java's ServiceLoader to load implementations.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IPlatformHelper
    Provides platform-specific helper implementation (e.g., Forge, Fabric).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> T
    load(Class<T> clazz)
    Loads a service implementation for the given interface using ServiceLoader.

    Methods inherited from class java.lang.Object

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

    • PLATFORM

      public static final IPlatformHelper PLATFORM
      Provides platform-specific helper implementation (e.g., Forge, Fabric). Used to check environment/platform and mod loading status.
  • Constructor Details

    • Services

      public Services()
  • Method Details

    • load

      public static <T> T load(Class<T> clazz)
      Loads a service implementation for the given interface using ServiceLoader.
      Type Parameters:
      T - Service type
      Parameters:
      clazz - Service interface class
      Returns:
      Loaded service implementation
      Throws:
      NullPointerException - if no implementation is found