Clean up warnings across code base

This commit is contained in:
Sam Brannen
2017-01-07 01:44:55 +01:00
parent 055da43e30
commit 9ed66bf2eb
51 changed files with 167 additions and 214 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,16 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans.factory.aspectj;
/**
* Generic-based dependency injection aspect.
* <p>
* This aspect allows users to implement efficient, type-safe dependency injection without
* the use of the &#64;Configurable annotation.
*
* The subaspect of this aspect doesn't need to include any AOP constructs.
* For example, here is a subaspect that configures the {@code PricingStrategyClient} objects.
* <p>This aspect allows users to implement efficient, type-safe dependency injection
* without the use of the {@code @Configurable} annotation.
*
* <p>The subaspect of this aspect doesn't need to include any AOP constructs. For
* example, here is a subaspect that configures the {@code PricingStrategyClient} objects.
*
* <pre class="code">
* aspect PricingStrategyDependencyInjectionAspect
* extends GenericInterfaceDrivenDependencyInjectionAspect<PricingStrategyClient> {
@@ -35,20 +37,23 @@ package org.springframework.beans.factory.aspectj;
* public void setPricingStrategy(PricingStrategy pricingStrategy) {
* this.pricingStrategy = pricingStrategy;
* }
* }
* </pre>
* }</pre>
*
* @author Ramnivas Laddad
* @since 3.0.0
* @since 3.0
*/
public abstract aspect GenericInterfaceDrivenDependencyInjectionAspect<I> extends AbstractInterfaceDrivenDependencyInjectionAspect {
declare parents: I implements ConfigurableObject;
declare parents: I implements ConfigurableObject;
public pointcut inConfigurableBean() : within(I+);
@SuppressWarnings("unchecked")
public final void configureBean(Object bean) {
configure((I)bean);
configure((I) bean);
}
// Unfortunately, erasure used with generics won't allow to use the same named method
protected abstract void configure(I bean);
}