1 15 package org.apache.tapestry.binding; 16 17 import org.apache.hivemind.Location; 18 import org.apache.hivemind.util.Defense; 19 import org.apache.tapestry.IComponent; 20 import org.apache.tapestry.coerce.ValueConverter; 21 22 26 public class ListenerMethodBinding extends AbstractBinding 27 { 28 private final IComponent _component; 29 30 private final String _methodName; 31 32 public ListenerMethodBinding(IComponent component, String methodName, String description, 33 ValueConverter valueConverter, Location location) 34 { 35 super(description, valueConverter, location); 36 37 Defense.notNull(component, "component"); 38 Defense.notNull(methodName, "methodName"); 39 40 _component = component; 41 _methodName = methodName; 42 } 43 44 public Object getComponent() 45 { 46 return _component; 47 } 48 49 public Object getObject() 50 { 51 return _component.getListeners().getListener(_methodName); 52 } 53 54 } | Popular Tags |