1
1
/*
2
- * Copyright 2002-2012 the original author or authors.
2
+ * Copyright 2002-2013 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
29
29
* <ul>
30
30
* <li>pattern: regular expression for the fully-qualified method names to match.
31
31
* 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.
34
34
* </ul>
35
35
*
36
36
* <p>Note: the regular expressions must be a match. For example,
37
37
* {@code .*get.*} will match com.mycom.Foo.getBar().
38
38
* {@code get.*} will not.
39
39
*
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.
43
42
*
44
43
* @author Rod Johnson
45
44
* @author Juergen Hoeller
51
50
public abstract class AbstractRegexpMethodPointcut extends StaticMethodMatcherPointcut
52
51
implements Serializable {
53
52
54
- /** Regular expressions to match */
53
+ /**
54
+ * Regular expressions to match.
55
+ */
55
56
private String [] patterns = new String [0 ];
56
57
57
- /** Regular expressions <strong>not</strong> to match */
58
+ /**
59
+ * Regular expressions <strong>not</strong> to match.
60
+ */
58
61
private String [] excludedPatterns = new String [0 ];
59
62
60
63
@@ -69,8 +72,8 @@ public void setPattern(String pattern) {
69
72
70
73
/**
71
74
* 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
74
77
*/
75
78
public void setPatterns (String ... patterns ) {
76
79
Assert .notEmpty (patterns , "'patterns' must not be empty" );
@@ -99,8 +102,8 @@ public void setExcludedPattern(String excludedPattern) {
99
102
100
103
/**
101
104
* 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
104
107
*/
105
108
public void setExcludedPatterns (String ... excludedPatterns ) {
106
109
Assert .notEmpty (excludedPatterns , "'excludedPatterns' must not be empty" );
@@ -173,18 +176,18 @@ protected boolean matchesPattern(String signatureString) {
173
176
protected abstract void initExcludedPatternRepresentation (String [] patterns ) throws IllegalArgumentException ;
174
177
175
178
/**
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
180
183
*/
181
184
protected abstract boolean matches (String pattern , int patternIndex );
182
185
183
186
/**
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
188
191
*/
189
192
protected abstract boolean matchesExclusion (String pattern , int patternIndex );
190
193
0 commit comments