class JGitFSHooks {

    public static void executeFSHooks(Object fsHook, FileSystemHooks hookType, FileSystemHookExecutionContext ctx) {
        if(fsHook == null){
            return;
        }
        if (fsHook instanceof List) {
            List hooks = (List) fsHook;
            hooks.forEach(h -> executeHook(h, hookType, ctx));
        } else {
            executeHook(fsHook, hookType, ctx);
        }
    }

}