类 NameMatchMethodPointcut

    • 方法详细资料

      • setMappedNames

        public void setMappedNames​(String... mappedNames)
        Set the method names defining methods to match. Matching will be the union of all these; if any match, the pointcut matches.
      • addMethodName

        public NameMatchMethodPointcut addMethodName​(String name)
        Add another eligible method name, in addition to those already named. Like the set methods, this method is for use when configuring proxies, before a proxy is used.

        NB: This method does not work after the proxy is in use, as advice chains will be cached.

        参数:
        name - the name of the additional method that will match
        返回:
        this pointcut to allow for multiple additions in one line
      • isMatch

        protected boolean isMatch​(String methodName,
                                  String mappedName)
        Return if the given method name matches the mapped name.

        The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. Can be overridden in subclasses.

        参数:
        methodName - the method name of the class
        mappedName - the name in the descriptor
        返回:
        if the names match
        另请参阅:
        PatternMatchUtils.simpleMatch(String, String)