if (isLazy) throw new SmartFrogLazyResolutionException("function has lazy parameter");
    public Object resolve(ReferenceResolver rr, int index)            throws SmartFrogResolutionException {        //take a new context...        //     iterate over the attributes of comp- ignoring any beginning with sf;        //     cache sfFunctionClass attribute;        //     resolve all non-sf attributes, if they are links        //     if any return s LAZY object, set self to lazy and return self, otherwise update copy        //     and invoke function with copy of CD, return result        Context forFunction = new ContextImpl();        String functionClass = null;        Object result;        if (getData()) return this;        if (rr instanceof ComponentDescription)            comp.setParent((ComponentDescription) rr);        else if (rr instanceof Prim)            comp.setPrimParent((Prim) rr);        try {            functionClass = (String) comp.sfResolveHere("sfFunctionClass");        } catch (ClassCastException e) {            throw new SmartFrogFunctionResolutionException("function class is not a string", e);        }        for (Iterator v = comp.sfAttributes(); v.hasNext();) {            Object name = v.next();            String nameS = name.toString();            if (!nameS.equals("sfFunctionClass")){                Object value = null;                try {                    value = comp.sfResolve(new Reference(ReferencePart.here(name)));                } catch (java.lang.StackOverflowError e) {                    throw new SmartFrogFunctionResolutionException(e);                }                if (value != null) {                    try {                        comp.sfReplaceAttribute(name, value);                        forFunction.sfAddAttribute(name, value);                    } catch (SmartFrogContextException e) {                        //shouldn't happen                    } catch (SmartFrogRuntimeException e) {                        //shouldn't happen                    }                }            }        }        if (functionClass == null) {            throw new SmartFrogFunctionResolutionException("unknown function class ");        }        try {            Function function = (Function) SFClassLoader.forName(functionClass).newInstance();            result = function.doit(forFunction, null, rr);        } catch (Exception e) {            throw (SmartFrogResolutionException) SmartFrogResolutionException.forward("failed to create or evaluate function class " + functionClass + " with data " + forFunction, e);        }        return result;    }