jodd.proxetta.pointcuts.AllRealMethodsPointcut Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jodd-proxetta Show documentation
Show all versions of jodd-proxetta Show documentation
Jodd Proxetta is the fastest proxy creator with unique approach for defying pointcuts and advices.
// Copyright (c) 2003-2014, Jodd Team (jodd.org). All Rights Reserved.
package jodd.proxetta.pointcuts;
import jodd.proxetta.MethodInfo;
/**
* Pointcut on all public methods that are not getters or setters
*/
public class AllRealMethodsPointcut extends ProxyPointcutSupport {
public boolean apply(MethodInfo methodInfo) {
if (hasReturnValue(methodInfo)
&& (matchMethodName(methodInfo, "get*") || (matchMethodName(methodInfo, "is*")))
&& hasNoArguments(methodInfo)) {
// getter
return false;
}
if (matchMethodName(methodInfo, "set*")
&& hasOneArgument(methodInfo)) {
// setter
return false;
}
return isPublic(methodInfo);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy