methodnamepointcut.java
来自「cwbbs 云网论坛源码」· Java 代码 · 共 28 行
JAVA
28 行
package com.cloudwebsoft.framework.aop.Pointcut;import com.cloudwebsoft.framework.aop.base.Pointcut;import java.lang.reflect.Method;public class MethodNamePointcut implements Pointcut { String methodName; boolean isStartWith; public MethodNamePointcut(String methodName, boolean isStartWith) { this.methodName = methodName; this.isStartWith = isStartWith; } public boolean hit(Object proxy, Method method, Object[] args) { if (isStartWith) { if (method.getName().startsWith(methodName)) return true; } else { if (method.getName().equals(methodName)) return true; } return false; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?