1 package org.seasar.cubby.customizer;
2
3 import java.lang.reflect.Method;
4
5 import org.seasar.cubby.aop.ActionMethodPointcutImpl;
6 import org.seasar.framework.aop.Pointcut;
7 import org.seasar.framework.util.StringUtil;
8
9
10
11
12
13
14 class PointcutFactory {
15
16
17
18
19
20
21
22
23 public static Pointcut createPointcut(final String pointcutStr) {
24 if (!StringUtil.isEmpty(pointcutStr)) {
25 String[] methodNames = StringUtil.split(pointcutStr, ", \n");
26 return new ActionMethodPointcutImpl(methodNames);
27 }
28 return null;
29 }
30
31
32
33
34
35
36
37
38
39 public static Pointcut createPointcut(final Class<?> clazz) {
40 return new ActionMethodPointcutImpl(clazz);
41 }
42
43
44
45
46
47
48
49
50
51 public static Pointcut createPointcut(final Method method) {
52 if (method != null) {
53 return new ActionMethodPointcutImpl(method);
54 }
55 return null;
56 }
57
58 }