Package io.mateu.util

Class SharedHelper

java.lang.Object
io.mateu.util.SharedHelper

public class SharedHelper extends Object
  • Field Details

    • propertiesLoaded

      public static boolean propertiesLoaded
  • Constructor Details

    • SharedHelper

      public SharedHelper()
  • Method Details

    • loadProperties

      public static void loadProperties()
    • getImpl

      public static <T> T getImpl(Class<T> anInterface) throws Exception
      look for implementation using the service loader (checks only 1 implementation exists)
      Type Parameters:
      T - the actual type
      Parameters:
      anInterface - the interface to look for
      Returns:
      implementation
      Throws:
      Exception - in case of not found or there
    • getImpls

      public static <T> List<T> getImpls(Class<T> anInterface)
      look for implementations using the service loader
      Type Parameters:
      T - the actual type
      Parameters:
      anInterface - the interface to look for
      Returns:
      list of implementations