All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.litongjava.hook.HookContainer Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package com.litongjava.hook;

import java.util.ArrayList;
import java.util.List;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class HookContainer {

  private static HookContainer me = new HookContainer();

  public static HookContainer me() {
    return me;
  }

  private HookContainer() {
  }

  /**
   * close时执行的方法
   */
  private List destroyMethods = new ArrayList<>();

  public void addDestroyMethod(Runnable task) {
    destroyMethods.add(task);
  }
  
  public List getDestroyMethods(){
    return destroyMethods;
  }

  public void clear() {
    destroyMethods.clear();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy