package com.hyprion.beckon;

import sun.misc.Signal;
import sun.misc.SignalHandler;

import java.util.List;

import java.util.concurrent.Callable;

public class SignalFolder implements SignalHandler {
    final private Callable[] fns;

    public SignalFolder(List funs) {
        fns = new Callable[funs.size()];
        for (int i = 0; i < fns.length; i++) {
            fns[i] = (Callable) funs.get(i);
        }
    }

    public void handle(Signal sig) {
        for (Callable c : fns) {
            boolean res = false;
            try {
                res = (Boolean) c.call(); // No input elems?
            }
            catch (Exception e) {}
            finally {
                if (!res) {
                    break;
                }
            }
        }
    }
}

@@ -510,18 +510,18 @@
 ean 
-res = fals
+cont = tru
 e;%0A 
@@ -557,52 +557,136 @@
     
-res = (Boolean) c.call(); // No input elems?
+Object oRes = c.call();%0A                if (oRes == false %7C%7C oRes == null) %7B%0A                    cont = false;%0A                %7D
 %0A   
@@ -778,11 +778,12 @@
 f (!
-res
+cont
 ) %7B%0A

Allow caller to return any kind of value.