Skip to content

Commit 9468548

Browse files
committed
Add @OverRide to remaining source files
Issue: SPR-10130
1 parent 30db112 commit 9468548

File tree

1,279 files changed

+5825
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,279 files changed

+5825
-2
lines changed

spring-aop/src/main/java/org/springframework/aop/TargetSource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public interface TargetSource extends TargetClassAware {
3939
* target class.
4040
* @return the type of targets returned by this {@link TargetSource}
4141
*/
42+
@Override
4243
Class<?> getTargetClass();
4344

4445
/**

spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class TrueClassFilter implements ClassFilter, Serializable {
3434
private TrueClassFilter() {
3535
}
3636

37+
@Override
3738
public boolean matches(Class clazz) {
3839
return true;
3940
}

spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,17 @@ class TrueMethodMatcher implements MethodMatcher, Serializable {
3535
private TrueMethodMatcher() {
3636
}
3737

38+
@Override
3839
public boolean isRuntime() {
3940
return false;
4041
}
4142

43+
@Override
4244
public boolean matches(Method method, Class targetClass) {
4345
return true;
4446
}
4547

48+
@Override
4649
public boolean matches(Method method, Class targetClass, Object[] args) {
4750
// Should never be invoked as isRuntime returns false.
4851
throw new UnsupportedOperationException();

spring-aop/src/main/java/org/springframework/aop/TruePointcut.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ class TruePointcut implements Pointcut, Serializable {
3434
private TruePointcut() {
3535
}
3636

37+
@Override
3738
public ClassFilter getClassFilter() {
3839
return ClassFilter.TRUE;
3940
}
4041

42+
@Override
4143
public MethodMatcher getMethodMatcher() {
4244
return MethodMatcher.TRUE;
4345
}

spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ public final ClassLoader getAspectClassLoader() {
203203
return this.aspectInstanceFactory.getAspectClassLoader();
204204
}
205205

206+
@Override
206207
public int getOrder() {
207208
return this.aspectInstanceFactory.getOrder();
208209
}
@@ -212,6 +213,7 @@ public void setAspectName(String name) {
212213
this.aspectName = name;
213214
}
214215

216+
@Override
215217
public String getAspectName() {
216218
return this.aspectName;
217219
}
@@ -223,6 +225,7 @@ public void setDeclarationOrder(int order) {
223225
this.declarationOrder = order;
224226
}
225227

228+
@Override
226229
public int getDeclarationOrder() {
227230
return this.declarationOrder;
228231
}
@@ -678,6 +681,7 @@ public AdviceExcludingMethodMatcher(Method adviceMethod) {
678681
this.adviceMethod = adviceMethod;
679682
}
680683

684+
@Override
681685
public boolean matches(Method method, Class targetClass) {
682686
return !this.adviceMethod.equals(method);
683687
}

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public void setThrowingName(String throwingName) {
222222
* @param method the target {@link Method}
223223
* @return the parameter names
224224
*/
225+
@Override
225226
public String[] getParameterNames(Method method) {
226227
this.argumentTypes = method.getParameterTypes();
227228
this.numberOfRemainingUnboundArguments = this.argumentTypes.length;
@@ -309,6 +310,7 @@ public String[] getParameterNames(Method method) {
309310
* @throws UnsupportedOperationException if
310311
* {@link #setRaiseExceptions(boolean) raiseExceptions} has been set to {@code true}
311312
*/
313+
@Override
312314
public String[] getParameterNames(Constructor ctor) {
313315
if (this.raiseExceptions) {
314316
throw new UnsupportedOperationException("An advice method can never be a constructor");

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public AspectJAfterAdvice(
3737
super(aspectJBeforeAdviceMethod, pointcut, aif);
3838
}
3939

40+
@Override
4041
public Object invoke(MethodInvocation mi) throws Throwable {
4142
try {
4243
return mi.proceed();
@@ -46,10 +47,12 @@ public Object invoke(MethodInvocation mi) throws Throwable {
4647
}
4748
}
4849

50+
@Override
4951
public boolean isBeforeAdvice() {
5052
return false;
5153
}
5254

55+
@Override
5356
public boolean isAfterAdvice() {
5457
return true;
5558
}

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterReturningAdvice.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ public AspectJAfterReturningAdvice(
4040
super(aspectJBeforeAdviceMethod, pointcut, aif);
4141
}
4242

43+
@Override
4344
public boolean isBeforeAdvice() {
4445
return false;
4546
}
4647

48+
@Override
4749
public boolean isAfterAdvice() {
4850
return true;
4951
}
@@ -53,6 +55,7 @@ public void setReturningName(String name) {
5355
setReturningNameNoCheck(name);
5456
}
5557

58+
@Override
5659
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
5760
if (shouldInvokeOnReturnValueOf(method, returnValue)) {
5861
invokeAdviceMethod(getJoinPointMatch(), returnValue, null);

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterThrowingAdvice.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ public AspectJAfterThrowingAdvice(
3737
super(aspectJBeforeAdviceMethod, pointcut, aif);
3838
}
3939

40+
@Override
4041
public boolean isBeforeAdvice() {
4142
return false;
4243
}
4344

45+
@Override
4446
public boolean isAfterAdvice() {
4547
return true;
4648
}
@@ -50,6 +52,7 @@ public void setThrowingName(String name) {
5052
setThrowingNameNoCheck(name);
5153
}
5254

55+
@Override
5356
public Object invoke(MethodInvocation mi) throws Throwable {
5457
try {
5558
return mi.proceed();

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAroundAdvice.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ public AspectJAroundAdvice(
4141
super(aspectJAroundAdviceMethod, pointcut, aif);
4242
}
4343

44+
@Override
4445
public boolean isBeforeAdvice() {
4546
return false;
4647
}
4748

49+
@Override
4850
public boolean isAfterAdvice() {
4951
return false;
5052
}
@@ -55,6 +57,7 @@ protected boolean supportsProceedingJoinPoint() {
5557
}
5658

5759

60+
@Override
5861
public Object invoke(MethodInvocation mi) throws Throwable {
5962
if (!(mi instanceof ProxyMethodInvocation)) {
6063
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,19 @@ public void setParameterTypes(Class[] types) {
155155
this.pointcutParameterTypes = types;
156156
}
157157

158+
@Override
158159
public void setBeanFactory(BeanFactory beanFactory) {
159160
this.beanFactory = beanFactory;
160161
}
161162

162163

164+
@Override
163165
public ClassFilter getClassFilter() {
164166
checkReadyToMatch();
165167
return this;
166168
}
167169

170+
@Override
168171
public MethodMatcher getMethodMatcher() {
169172
checkReadyToMatch();
170173
return this;
@@ -244,6 +247,7 @@ public PointcutExpression getPointcutExpression() {
244247
return this.pointcutExpression;
245248
}
246249

250+
@Override
247251
public boolean matches(Class targetClass) {
248252
checkReadyToMatch();
249253
try {
@@ -267,6 +271,7 @@ public boolean matches(Class targetClass) {
267271
}
268272
}
269273

274+
@Override
270275
public boolean matches(Method method, Class targetClass, boolean beanHasIntroductions) {
271276
checkReadyToMatch();
272277
Method targetMethod = AopUtils.getMostSpecificMethod(method, targetClass);
@@ -287,15 +292,18 @@ else if (shadowMatch.neverMatches()) {
287292
}
288293
}
289294

295+
@Override
290296
public boolean matches(Method method, Class targetClass) {
291297
return matches(method, targetClass, false);
292298
}
293299

300+
@Override
294301
public boolean isRuntime() {
295302
checkReadyToMatch();
296303
return this.pointcutExpression.mayNeedDynamicTest();
297304
}
298305

306+
@Override
299307
public boolean matches(Method method, Class targetClass, Object[] args) {
300308
checkReadyToMatch();
301309
ShadowMatch shadowMatch = getShadowMatch(AopUtils.getMostSpecificMethod(method, targetClass), method);
@@ -506,10 +514,12 @@ private class BeanNamePointcutDesignatorHandler implements PointcutDesignatorHan
506514

507515
private static final String BEAN_DESIGNATOR_NAME = "bean";
508516

517+
@Override
509518
public String getDesignatorName() {
510519
return BEAN_DESIGNATOR_NAME;
511520
}
512521

522+
@Override
513523
public ContextBasedMatcher parse(String expression) {
514524
return new BeanNameContextMatcher(expression);
515525
}
@@ -531,22 +541,27 @@ public BeanNameContextMatcher(String expression) {
531541
this.expressionPattern = new NamePattern(expression);
532542
}
533543

544+
@Override
534545
public boolean couldMatchJoinPointsInType(Class someClass) {
535546
return (contextMatch(someClass) == FuzzyBoolean.YES);
536547
}
537548

549+
@Override
538550
public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) {
539551
return (contextMatch(someClass) == FuzzyBoolean.YES);
540552
}
541553

554+
@Override
542555
public boolean matchesDynamically(MatchingContext context) {
543556
return true;
544557
}
545558

559+
@Override
546560
public FuzzyBoolean matchesStatically(MatchingContext context) {
547561
return contextMatch(null);
548562
}
549563

564+
@Override
550565
public boolean mayNeedDynamicTest() {
551566
return false;
552567
}
@@ -611,18 +626,22 @@ public DefensiveShadowMatch(ShadowMatch primary, ShadowMatch other) {
611626
this.other = other;
612627
}
613628

629+
@Override
614630
public boolean alwaysMatches() {
615631
return primary.alwaysMatches();
616632
}
617633

634+
@Override
618635
public boolean maybeMatches() {
619636
return primary.maybeMatches();
620637
}
621638

639+
@Override
622640
public boolean neverMatches() {
623641
return primary.neverMatches();
624642
}
625643

644+
@Override
626645
public JoinPointMatch matchesJoinPoint(Object thisObject,
627646
Object targetObject, Object[] args) {
628647
try {
@@ -632,6 +651,7 @@ public JoinPointMatch matchesJoinPoint(Object thisObject,
632651
}
633652
}
634653

654+
@Override
635655
public void setMatchingContext(MatchingContext aMatchContext) {
636656
primary.setMatchingContext(aMatchContext);
637657
other.setMatchingContext(aMatchContext);

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class AspectJExpressionPointcutAdvisor extends AbstractGenericPointcutAdv
3131
private final AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
3232

3333

34+
@Override
3435
public Pointcut getPointcut() {
3536
return this.pointcut;
3637
}

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJMethodBeforeAdvice.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,17 @@ public AspectJMethodBeforeAdvice(
3535
super(aspectJBeforeAdviceMethod, pointcut, aif);
3636
}
3737

38+
@Override
3839
public void before(Method method, Object[] args, Object target) throws Throwable {
3940
invokeAdviceMethod(getJoinPointMatch(), null, null);
4041
}
4142

43+
@Override
4244
public boolean isBeforeAdvice() {
4345
return true;
4446
}
4547

48+
@Override
4649
public boolean isAfterAdvice() {
4750
return false;
4851
}

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,22 @@ public void setOrder(int order) {
5656
}
5757

5858

59+
@Override
5960
public boolean isPerInstance() {
6061
return true;
6162
}
6263

64+
@Override
6365
public Advice getAdvice() {
6466
return this.advice;
6567
}
6668

69+
@Override
6770
public Pointcut getPointcut() {
6871
return this.pointcut;
6972
}
7073

74+
@Override
7175
public int getOrder() {
7276
if (this.order != null) {
7377
return this.order;

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class AspectJWeaverMessageHandler implements IMessageHandler {
4848
private static final Log LOGGER = LogFactory.getLog("AspectJ Weaver");
4949

5050

51+
@Override
5152
public boolean handleMessage(IMessage message) throws AbortException {
5253
Kind messageKind = message.getKind();
5354

@@ -89,15 +90,18 @@ private String makeMessageFor(IMessage aMessage) {
8990
return AJ_ID + aMessage.getMessage();
9091
}
9192

93+
@Override
9294
public boolean isIgnoring(Kind messageKind) {
9395
// We want to see everything, and allow configuration of log levels dynamically.
9496
return false;
9597
}
9698

99+
@Override
97100
public void dontIgnore(Kind messageKind) {
98101
// We weren't ignoring anything anyway...
99102
}
100103

104+
@Override
101105
public void ignore(Kind kind) {
102106
// We weren't ignoring anything anyway...
103107
}

0 commit comments

Comments
 (0)