com.litongjava.hook.HookContainer Maven / Gradle / Ivy
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