Class CustomEventMapper

java.lang.Object
de.presti.ree6.utils.data.CustomEventMapper

public class CustomEventMapper extends Object
A Mapper that maps an Event to a EventTyp.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Map<Class<? extends net.dv8tion.jda.api.events.GenericEvent>,de.presti.ree6.sql.entities.custom.CustomEventTyp>
    The map for the CustomEventMapper.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Class<? extends net.dv8tion.jda.api.events.GenericEvent>
    getClass(de.presti.ree6.sql.entities.custom.CustomEventTyp typ)
    Get the event class for the given EventTyp.
    static de.presti.ree6.sql.entities.custom.CustomEventTyp
    getEventTyp(Class<? extends net.dv8tion.jda.api.events.GenericEvent> clazz)
    Get the EventTyp for the given event class.
    static void
    Load the CustomEventMapper.

    Methods inherited from class java.lang.Object

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

    • map

      public static Map<Class<? extends net.dv8tion.jda.api.events.GenericEvent>,de.presti.ree6.sql.entities.custom.CustomEventTyp> map
      The map for the CustomEventMapper.
  • Constructor Details

    • CustomEventMapper

      public CustomEventMapper()
  • Method Details

    • load

      public static void load()
      Load the CustomEventMapper.
    • getEventTyp

      public static de.presti.ree6.sql.entities.custom.CustomEventTyp getEventTyp(Class<? extends net.dv8tion.jda.api.events.GenericEvent> clazz)
      Get the EventTyp for the given event class.
      Parameters:
      clazz - The event class.
      Returns:
      The EventTyp.
    • getClass

      public static Class<? extends net.dv8tion.jda.api.events.GenericEvent> getClass(de.presti.ree6.sql.entities.custom.CustomEventTyp typ)
      Get the event class for the given EventTyp.
      Parameters:
      typ - The EventTyp.
      Returns:
      The event class.