Class EnumLoader

java.lang.Object
fr.sandro642.github.misc.EnumLoader

public class EnumLoader extends Object
ConvertEnum is a utility class for converting enums that implement the RouteImport interface into a map of routes. This class provides a method to convert an enum class into a map where the keys are the enum constants and the values are their corresponding routes.
Since:
1.0
  • Constructor Details

    • EnumLoader

      public EnumLoader()
  • Method Details

    • convertRouteImport

      public static Map<Enum<?>,String> convertRouteImport(Class<? extends Enum<?>> enumClass)
      Converts an enum class that implements RouteImport into a map. The keys of the map are the enum constants, and the values are their corresponding routes.
      Parameters:
      enumClass - the class of the enum to convert
      Returns:
      a map containing the enum constants as keys and their routes as values