Skip to content

Commit

Permalink
Add @OverRide to remaining source files
Browse files Browse the repository at this point in the history
Issue: SPR-10130
  • Loading branch information
rwinch committed May 13, 2013
1 parent 30db112 commit 9468548
Show file tree
Hide file tree
Showing 1,279 changed files with 5,825 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public interface TargetSource extends TargetClassAware {
* target class.
* @return the type of targets returned by this {@link TargetSource}
*/
@Override
Class<?> getTargetClass();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class TrueClassFilter implements ClassFilter, Serializable {
private TrueClassFilter() {
}

@Override
public boolean matches(Class clazz) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ class TrueMethodMatcher implements MethodMatcher, Serializable {
private TrueMethodMatcher() {
}

@Override
public boolean isRuntime() {
return false;
}

@Override
public boolean matches(Method method, Class targetClass) {
return true;
}

@Override
public boolean matches(Method method, Class targetClass, Object[] args) {
// Should never be invoked as isRuntime returns false.
throw new UnsupportedOperationException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ class TruePointcut implements Pointcut, Serializable {
private TruePointcut() {
}

@Override
public ClassFilter getClassFilter() {
return ClassFilter.TRUE;
}

@Override
public MethodMatcher getMethodMatcher() {
return MethodMatcher.TRUE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public final ClassLoader getAspectClassLoader() {
return this.aspectInstanceFactory.getAspectClassLoader();
}

@Override
public int getOrder() {
return this.aspectInstanceFactory.getOrder();
}
Expand All @@ -212,6 +213,7 @@ public void setAspectName(String name) {
this.aspectName = name;
}

@Override
public String getAspectName() {
return this.aspectName;
}
Expand All @@ -223,6 +225,7 @@ public void setDeclarationOrder(int order) {
this.declarationOrder = order;
}

@Override
public int getDeclarationOrder() {
return this.declarationOrder;
}
Expand Down Expand Up @@ -678,6 +681,7 @@ public AdviceExcludingMethodMatcher(Method adviceMethod) {
this.adviceMethod = adviceMethod;
}

@Override
public boolean matches(Method method, Class targetClass) {
return !this.adviceMethod.equals(method);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public void setThrowingName(String throwingName) {
* @param method the target {@link Method}
* @return the parameter names
*/
@Override
public String[] getParameterNames(Method method) {
this.argumentTypes = method.getParameterTypes();
this.numberOfRemainingUnboundArguments = this.argumentTypes.length;
Expand Down Expand Up @@ -309,6 +310,7 @@ public String[] getParameterNames(Method method) {
* @throws UnsupportedOperationException if
* {@link #setRaiseExceptions(boolean) raiseExceptions} has been set to {@code true}
*/
@Override
public String[] getParameterNames(Constructor ctor) {
if (this.raiseExceptions) {
throw new UnsupportedOperationException("An advice method can never be a constructor");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public AspectJAfterAdvice(
super(aspectJBeforeAdviceMethod, pointcut, aif);
}

@Override
public Object invoke(MethodInvocation mi) throws Throwable {
try {
return mi.proceed();
Expand All @@ -46,10 +47,12 @@ public Object invoke(MethodInvocation mi) throws Throwable {
}
}

@Override
public boolean isBeforeAdvice() {
return false;
}

@Override
public boolean isAfterAdvice() {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ public AspectJAfterReturningAdvice(
super(aspectJBeforeAdviceMethod, pointcut, aif);
}

@Override
public boolean isBeforeAdvice() {
return false;
}

@Override
public boolean isAfterAdvice() {
return true;
}
Expand All @@ -53,6 +55,7 @@ public void setReturningName(String name) {
setReturningNameNoCheck(name);
}

@Override
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
if (shouldInvokeOnReturnValueOf(method, returnValue)) {
invokeAdviceMethod(getJoinPointMatch(), returnValue, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ public AspectJAfterThrowingAdvice(
super(aspectJBeforeAdviceMethod, pointcut, aif);
}

@Override
public boolean isBeforeAdvice() {
return false;
}

@Override
public boolean isAfterAdvice() {
return true;
}
Expand All @@ -50,6 +52,7 @@ public void setThrowingName(String name) {
setThrowingNameNoCheck(name);
}

@Override
public Object invoke(MethodInvocation mi) throws Throwable {
try {
return mi.proceed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ public AspectJAroundAdvice(
super(aspectJAroundAdviceMethod, pointcut, aif);
}

@Override
public boolean isBeforeAdvice() {
return false;
}

@Override
public boolean isAfterAdvice() {
return false;
}
Expand All @@ -55,6 +57,7 @@ protected boolean supportsProceedingJoinPoint() {
}


@Override
public Object invoke(MethodInvocation mi) throws Throwable {
if (!(mi instanceof ProxyMethodInvocation)) {
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,19 @@ public void setParameterTypes(Class[] types) {
this.pointcutParameterTypes = types;
}

@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}


@Override
public ClassFilter getClassFilter() {
checkReadyToMatch();
return this;
}

@Override
public MethodMatcher getMethodMatcher() {
checkReadyToMatch();
return this;
Expand Down Expand Up @@ -244,6 +247,7 @@ public PointcutExpression getPointcutExpression() {
return this.pointcutExpression;
}

@Override
public boolean matches(Class targetClass) {
checkReadyToMatch();
try {
Expand All @@ -267,6 +271,7 @@ public boolean matches(Class targetClass) {
}
}

@Override
public boolean matches(Method method, Class targetClass, boolean beanHasIntroductions) {
checkReadyToMatch();
Method targetMethod = AopUtils.getMostSpecificMethod(method, targetClass);
Expand All @@ -287,15 +292,18 @@ else if (shadowMatch.neverMatches()) {
}
}

@Override
public boolean matches(Method method, Class targetClass) {
return matches(method, targetClass, false);
}

@Override
public boolean isRuntime() {
checkReadyToMatch();
return this.pointcutExpression.mayNeedDynamicTest();
}

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

private static final String BEAN_DESIGNATOR_NAME = "bean";

@Override
public String getDesignatorName() {
return BEAN_DESIGNATOR_NAME;
}

@Override
public ContextBasedMatcher parse(String expression) {
return new BeanNameContextMatcher(expression);
}
Expand All @@ -531,22 +541,27 @@ public BeanNameContextMatcher(String expression) {
this.expressionPattern = new NamePattern(expression);
}

@Override
public boolean couldMatchJoinPointsInType(Class someClass) {
return (contextMatch(someClass) == FuzzyBoolean.YES);
}

@Override
public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) {
return (contextMatch(someClass) == FuzzyBoolean.YES);
}

@Override
public boolean matchesDynamically(MatchingContext context) {
return true;
}

@Override
public FuzzyBoolean matchesStatically(MatchingContext context) {
return contextMatch(null);
}

@Override
public boolean mayNeedDynamicTest() {
return false;
}
Expand Down Expand Up @@ -611,18 +626,22 @@ public DefensiveShadowMatch(ShadowMatch primary, ShadowMatch other) {
this.other = other;
}

@Override
public boolean alwaysMatches() {
return primary.alwaysMatches();
}

@Override
public boolean maybeMatches() {
return primary.maybeMatches();
}

@Override
public boolean neverMatches() {
return primary.neverMatches();
}

@Override
public JoinPointMatch matchesJoinPoint(Object thisObject,
Object targetObject, Object[] args) {
try {
Expand All @@ -632,6 +651,7 @@ public JoinPointMatch matchesJoinPoint(Object thisObject,
}
}

@Override
public void setMatchingContext(MatchingContext aMatchContext) {
primary.setMatchingContext(aMatchContext);
other.setMatchingContext(aMatchContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class AspectJExpressionPointcutAdvisor extends AbstractGenericPointcutAdv
private final AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();


@Override
public Pointcut getPointcut() {
return this.pointcut;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ public AspectJMethodBeforeAdvice(
super(aspectJBeforeAdviceMethod, pointcut, aif);
}

@Override
public void before(Method method, Object[] args, Object target) throws Throwable {
invokeAdviceMethod(getJoinPointMatch(), null, null);
}

@Override
public boolean isBeforeAdvice() {
return true;
}

@Override
public boolean isAfterAdvice() {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,22 @@ public void setOrder(int order) {
}


@Override
public boolean isPerInstance() {
return true;
}

@Override
public Advice getAdvice() {
return this.advice;
}

@Override
public Pointcut getPointcut() {
return this.pointcut;
}

@Override
public int getOrder() {
if (this.order != null) {
return this.order;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class AspectJWeaverMessageHandler implements IMessageHandler {
private static final Log LOGGER = LogFactory.getLog("AspectJ Weaver");


@Override
public boolean handleMessage(IMessage message) throws AbortException {
Kind messageKind = message.getKind();

Expand Down Expand Up @@ -89,15 +90,18 @@ private String makeMessageFor(IMessage aMessage) {
return AJ_ID + aMessage.getMessage();
}

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

@Override
public void dontIgnore(Kind messageKind) {
// We weren't ignoring anything anyway...
}

@Override
public void ignore(Kind kind) {
// We weren't ignoring anything anyway...
}
Expand Down
Loading

0 comments on commit 9468548

Please sign in to comment.