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

de.intarsys.tools.functor.EventFunctorCallFactory Maven / Gradle / Ivy

There is a newer version: 4.11
Show newest version
package de.intarsys.tools.functor;

import de.intarsys.tools.event.RequestEvent;
import de.intarsys.tools.event.IRequestEvent;
import de.intarsys.tools.facade.FacadeTools;
import de.intarsys.tools.reflect.ObjectCreationException;

public class EventFunctorCallFactory implements IFunctorCallFactory {

	public IFunctorCall createFunctorCall(IFunctor functor, Object receiver,
			IArgs args) throws ObjectCreationException {
		RequestEvent event = new RequestEvent(receiver);
		event.setTarget(args.get("event.target"));
		event.setArgs(args);
		args.put(IRequestEvent.ARG_EVENT, FacadeTools.createFacade(event));
		args.put(IRequestEvent.ARG_JEVENT, event);
		return new FunctorCall(receiver, args);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy