Skip to content

Commit 675b650

Browse files
committed
Polishing
1 parent 5661d38 commit 675b650

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

spring-aop/src/main/java/org/springframework/aop/support/AbstractRegexpMethodPointcut.java

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,17 +29,16 @@
2929
* <ul>
3030
* <li>pattern: regular expression for the fully-qualified method names to match.
3131
* The exact regexp syntax will depend on the subclass (e.g. Perl5 regular expressions)
32-
* <li>patterns: alternative property taking a String array of patterns. The result will
33-
* be the union of these patterns.
32+
* <li>patterns: alternative property taking a String array of patterns.
33+
* The result will be the union of these patterns.
3434
* </ul>
3535
*
3636
* <p>Note: the regular expressions must be a match. For example,
3737
* {@code .*get.*} will match com.mycom.Foo.getBar().
3838
* {@code get.*} will not.
3939
*
40-
* <p>This base class is serializable. Subclasses should declare all fields transient
41-
* - the initPatternRepresentation method in this class will be invoked again on the
42-
* client side on deserialization.
40+
* <p>This base class is serializable. Subclasses should declare all fields transient;
41+
* the {@link #initPatternRepresentation} method will be invoked again on deserialization.
4342
*
4443
* @author Rod Johnson
4544
* @author Juergen Hoeller
@@ -51,10 +50,14 @@
5150
public abstract class AbstractRegexpMethodPointcut extends StaticMethodMatcherPointcut
5251
implements Serializable {
5352

54-
/** Regular expressions to match */
53+
/**
54+
* Regular expressions to match.
55+
*/
5556
private String[] patterns = new String[0];
5657

57-
/** Regular expressions <strong>not</strong> to match */
58+
/**
59+
* Regular expressions <strong>not</strong> to match.
60+
*/
5861
private String[] excludedPatterns = new String[0];
5962

6063

@@ -69,8 +72,8 @@ public void setPattern(String pattern) {
6972

7073
/**
7174
* Set the regular expressions defining methods to match.
72-
* Matching will be the union of all these; if any match,
73-
* the pointcut matches.
75+
* Matching will be the union of all these; if any match, the pointcut matches.
76+
* @see #setPattern
7477
*/
7578
public void setPatterns(String... patterns) {
7679
Assert.notEmpty(patterns, "'patterns' must not be empty");
@@ -99,8 +102,8 @@ public void setExcludedPattern(String excludedPattern) {
99102

100103
/**
101104
* Set the regular expressions defining methods to match for exclusion.
102-
* Matching will be the union of all these; if any match,
103-
* the pointcut matches.
105+
* Matching will be the union of all these; if any match, the pointcut matches.
106+
* @see #setExcludedPattern
104107
*/
105108
public void setExcludedPatterns(String... excludedPatterns) {
106109
Assert.notEmpty(excludedPatterns, "'excludedPatterns' must not be empty");
@@ -173,18 +176,18 @@ protected boolean matchesPattern(String signatureString) {
173176
protected abstract void initExcludedPatternRepresentation(String[] patterns) throws IllegalArgumentException;
174177

175178
/**
176-
* Does the pattern at the given index match this string?
177-
* @param pattern {@code String} pattern to match
178-
* @param patternIndex index of pattern from 0
179-
* @return {@code true} if there is a match, else {@code false}.
179+
* Does the pattern at the given index match the given String?
180+
* @param pattern the {@code String} pattern to match
181+
* @param patternIndex index of pattern (starting from 0)
182+
* @return {@code true} if there is a match, {@code false} otherwise
180183
*/
181184
protected abstract boolean matches(String pattern, int patternIndex);
182185

183186
/**
184-
* Does the exclusion pattern at the given index match this string?
185-
* @param pattern {@code String} pattern to match.
186-
* @param patternIndex index of pattern starting from 0.
187-
* @return {@code true} if there is a match, else {@code false}.
187+
* Does the exclusion pattern at the given index match the given String?
188+
* @param pattern the {@code String} pattern to match
189+
* @param patternIndex index of pattern (starting from 0)
190+
* @return {@code true} if there is a match, {@code false} otherwise
188191
*/
189192
protected abstract boolean matchesExclusion(String pattern, int patternIndex);
190193

0 commit comments

Comments
 (0)