1 package com.atlassian.plugin.event.impl;
2
3 import java.lang.reflect.Method;
4
5 /**
6 * Listener method selector that makes its determination by matching the method name
7 */
8 public class MethodNameListenerMethodSelector implements ListenerMethodSelector
9 {
10 private final String methodName;
11
12 public MethodNameListenerMethodSelector()
13 {
14 this("channel");
15 }
16
17 public MethodNameListenerMethodSelector(String s)
18 {
19 this.methodName = s;
20 }
21
22
23 public boolean isListenerMethod(Method method)
24 {
25 return methodName.equals(method.getName());
26 }
27 }