1 /* 2 * Copyright 2004-2008 the Seasar Foundation and the Others. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 13 * either express or implied. See the License for the specific language 14 * governing permissions and limitations under the License. 15 */ 16 package org.seasar.uruma.binding.method; 17 18 import org.seasar.uruma.annotation.EventListenerType; 19 import org.seasar.uruma.context.PartContext; 20 import org.seasar.uruma.context.WidgetHandle; 21 22 /** 23 * {@link WidgetHandle} の保持するウィジットに対してリスナを設定するためのインターフェースです。<br /> 24 * 25 * @author y-komori 26 */ 27 public interface ListenerBinder { 28 /** 29 * {@link WidgetHandle} の保持するウィジットに対してリスナを設定します。<br /> 30 * 31 * @param handle 32 * {@link WidgetHandle} オブジェクト 33 * @param context 34 * {@link PartContext} オブジェクト 35 * @param binding 36 * {@link MethodBinding} オブジェクト 37 * @param def 38 * {@link EventListenerDef} オブジェクト 39 * @return バインドしたリスナのクラス 40 */ 41 public Class<?> bindListener(WidgetHandle handle, PartContext context, 42 MethodBinding binding, EventListenerDef def); 43 44 /** 45 * 本 {@link ListenerBinder} が対象とするクラスを返します。<br /> 46 * 47 * @return 対象クラス 48 */ 49 public Class<?> getTargetCLass(); 50 51 /** 52 * 本 {@link ListenerBinder} が対象とする {@link EventListenerType} を返します。<br /> 53 * すべての種類のイベントを対象とする場合、<code>null</code> を返します。<br /> 54 * 55 * @return {@link EventListenerType} の配列または <code>null</code> 56 */ 57 public EventListenerType[] getEventTypes(); 58 }