org.springframework.aop.support

## 类 AbstractRegexpMethodPointcut

- java.lang.Object
- - org.springframework.aop.support.StaticMethodMatcher
  - - org.springframework.aop.support.StaticMethodMatcherPointcut
    - - org.springframework.aop.support.AbstractRegexpMethodPointcut

- 所有已实现的接口:
    Serializable, MethodMatcher, Pointcut
  直接已知子类:
    JdkRegexpMethodPointcut

      public abstract class AbstractRegexpMethodPointcut
      extends StaticMethodMatcherPointcut
      implements Serializable

  Abstract base regular expression pointcut bean. JavaBean properties are:
  - pattern: regular expression for the fully-qualified method names to match. The exact regexp syntax will depend on the subclass (e.g. Perl5 regular expressions)
  - patterns: alternative property taking a String array of patterns. The result will be the union of these patterns.

  Note: the regular expressions must be a match. For example, `.*get.*` will match com.mycom.Foo.getBar(). `get.*` will not.

  This base class is serializable. Subclasses should declare all fields transient; the `initPatternRepresentation(java.lang.String[])` method will be invoked again on deserialization.

  从以下版本开始:
    1.1
  作者:
    Rod Johnson, Juergen Hoeller, Rob Harrop
  另请参阅:
    `JdkRegexpMethodPointcut`, 序列化表格

- - ### 字段概要

    - ### 从接口继承的字段 org.springframework.aop.Pointcut

      `TRUE`

    - ### 从接口继承的字段 org.springframework.aop.MethodMatcher

      `TRUE`

  - ### 构造器概要

    构造器
    构造器和说明
    `AbstractRegexpMethodPointcut()`

  - ### 方法概要

    所有方法 实例方法 抽象方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `equals(Object other)`
    `String[]` | `getExcludedPatterns()` Returns the regular expressions for exclusion matching.
    `String[]` | `getPatterns()` Return the regular expressions for method matching.
    `int` | `hashCode()`
    `protected abstract void` | `initExcludedPatternRepresentation(String[] patterns)` Subclasses must implement this to initialize regexp pointcuts.
    `protected abstract void` | `initPatternRepresentation(String[] patterns)` Subclasses must implement this to initialize regexp pointcuts.
    `boolean` | `matches(Method method, Class<?> targetClass)` Try to match the regular expression against the fully qualified name of the target class as well as against the method's declaring class, plus the name of the method.
    `protected abstract boolean` | `matches(String pattern, int patternIndex)` Does the pattern at the given index match the given String?
    `protected abstract boolean` | `matchesExclusion(String pattern, int patternIndex)` Does the exclusion pattern at the given index match the given String?
    `protected boolean` | `matchesPattern(String signatureString)` Match the specified candidate against the configured patterns.
    `void` | `setExcludedPattern(String excludedPattern)` Convenience method when we have only a single exclusion pattern.
    `void` | `setExcludedPatterns(String... excludedPatterns)` Set the regular expressions defining methods to match for exclusion.
    `void` | `setPattern(String pattern)` Convenience method when we have only a single pattern.
    `void` | `setPatterns(String... patterns)` Set the regular expressions defining methods to match.
    `String` | `toString()`

    - ### 从类继承的方法 org.springframework.aop.support.StaticMethodMatcherPointcut

      `getClassFilter, getMethodMatcher, setClassFilter`

    - ### 从类继承的方法 org.springframework.aop.support.StaticMethodMatcher

      `isRuntime, matches`

    - ### 从类继承的方法 java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### AbstractRegexpMethodPointcut

          public AbstractRegexpMethodPointcut()

  - ### 方法详细资料

    - #### setPattern

          public void setPattern(String pattern)

      Convenience method when we have only a single pattern. Use either this method or `setPatterns(java.lang.String...)`, not both.
      另请参阅:
        `setPatterns(java.lang.String...)`

    - #### setPatterns

          public void setPatterns(String... patterns)

      Set the regular expressions defining methods to match. Matching will be the union of all these; if any match, the pointcut matches.
      另请参阅:
        `setPattern(java.lang.String)`

    - #### getPatterns

          public String[] getPatterns()

      Return the regular expressions for method matching.

    - #### setExcludedPattern

          public void setExcludedPattern(String excludedPattern)

      Convenience method when we have only a single exclusion pattern. Use either this method or `setExcludedPatterns(java.lang.String...)`, not both.
      另请参阅:
        `setExcludedPatterns(java.lang.String...)`

    - #### setExcludedPatterns

          public void setExcludedPatterns(String... excludedPatterns)

      Set the regular expressions defining methods to match for exclusion. Matching will be the union of all these; if any match, the pointcut matches.
      另请参阅:
        `setExcludedPattern(java.lang.String)`

    - #### getExcludedPatterns

          public String[] getExcludedPatterns()

      Returns the regular expressions for exclusion matching.

    - #### matches

          public boolean matches(Method method,
                                 @Nullable
                                 Class<?> targetClass)

      Try to match the regular expression against the fully qualified name of the target class as well as against the method's declaring class, plus the name of the method.
      指定者:
        `matches` 在接口中 `MethodMatcher`
      参数:
        `method` - the candidate method
        `targetClass` - the target class (may be `null`, in which case the candidate class must be taken to be the method's declaring class)
      返回:
        whether or not this method matches statically

    - #### matchesPattern

          protected boolean matchesPattern(String signatureString)

      Match the specified candidate against the configured patterns.
      参数:
        `signatureString` - "java.lang.Object.hashCode" style signature
      返回:
        whether the candidate matches at least one of the specified patterns

    - #### initPatternRepresentation

          protected abstract void initPatternRepresentation(String[] patterns)
                                                     throws IllegalArgumentException

      Subclasses must implement this to initialize regexp pointcuts. Can be invoked multiple times.

      This method will be invoked from the `setPatterns(java.lang.String...)` method, and also on deserialization.

      参数:
        `patterns` - the patterns to initialize
      抛出:
        `IllegalArgumentException` - in case of an invalid pattern

    - #### initExcludedPatternRepresentation

          protected abstract void initExcludedPatternRepresentation(String[] patterns)
                                                             throws IllegalArgumentException

      Subclasses must implement this to initialize regexp pointcuts. Can be invoked multiple times.

      This method will be invoked from the `setExcludedPatterns(java.lang.String...)` method, and also on deserialization.

      参数:
        `patterns` - the patterns to initialize
      抛出:
        `IllegalArgumentException` - in case of an invalid pattern

    - #### matches

          protected abstract boolean matches(String pattern,
                                             int patternIndex)

      Does the pattern at the given index match the given String?
      参数:
        `pattern` - the `String` pattern to match
        `patternIndex` - index of pattern (starting from 0)
      返回:
        `true` if there is a match, `false` otherwise

    - #### matchesExclusion

          protected abstract boolean matchesExclusion(String pattern,
                                                      int patternIndex)

      Does the exclusion pattern at the given index match the given String?
      参数:
        `pattern` - the `String` pattern to match
        `patternIndex` - index of pattern (starting from 0)
      返回:
        `true` if there is a match, `false` otherwise

    - #### equals

          public boolean equals(Object other)

      覆盖:
        `equals` 在类中 `Object`

    - #### hashCode

          public int hashCode()

      覆盖:
        `hashCode` 在类中 `Object`

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`