Esempio n. 1
0
 /**
  * Bake all handler lists. Best used just after all normal event registration is complete, ie just
  * after all plugins are loaded if you're using fevents in a plugin system.
  */
 public static void bakeAll() {
   synchronized (allLists) {
     for (HandlerList h : allLists) {
       h.bake();
     }
   }
 }
Esempio n. 2
0
 /**
  * Get the baked registered listeners associated with this handler list
  *
  * @return the array of registered listeners
  */
 public RegisteredListener[] getRegisteredListeners() {
   RegisteredListener[] handlers;
   while ((handlers = this.handlers) == null) {
     bake(); // This prevents fringe cases of returning null
   }
   return handlers;
 }