package org.seasar.tapestry.ognl.binder.impl;

import org.seasar.tapestry.listener.ComponentMethodActionListener;
import org.seasar.tapestry.ognl.binder.Binder;

/**
 * @author Masataka Kurihara (Gluegent, Inc.)
 */
public class ListenerMethodBinder implements Binder{
    
    private Object component;
    
    public ListenerMethodBinder(Object component) {
        if(component == null) {
            throw new IllegalArgumentException();
        }
        this.component = component;
    }
    
	public Object getBinging(String methodName) {
		return new ComponentMethodActionListener(component, methodName);
	}
}
