Package io.mateu.util

Class SharedHelper


  • public class SharedHelper
    extends Object
    • Field Detail

      • propertiesLoaded

        public static boolean propertiesLoaded
    • Constructor Detail

      • SharedHelper

        public SharedHelper()
    • Method Detail

      • 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