Java Code Examples for org.springframework.aop.aspectj.AspectJProxyUtils

The following examples show how to use org.springframework.aop.aspectj.AspectJProxyUtils. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: spring-analysis-note   Source File: AspectJProxyFactory.java    License: MIT License 5 votes vote down vote up
/**
 * Add all {@link Advisor Advisors} from the supplied {@link MetadataAwareAspectInstanceFactory}
 * to the current chain. Exposes any special purpose {@link Advisor Advisors} if needed.
 * @see AspectJProxyUtils#makeAdvisorChainAspectJCapableIfNecessary(List)
 */
private void addAdvisorsFromAspectInstanceFactory(MetadataAwareAspectInstanceFactory instanceFactory) {
	List<Advisor> advisors = this.aspectFactory.getAdvisors(instanceFactory);
	Class<?> targetClass = getTargetClass();
	Assert.state(targetClass != null, "Unresolvable target class");
	advisors = AopUtils.findAdvisorsThatCanApply(advisors, targetClass);
	AspectJProxyUtils.makeAdvisorChainAspectJCapableIfNecessary(advisors);
	AnnotationAwareOrderComparator.sort(advisors);
	addAdvisors(advisors);
}
 
Example 2
Source Project: java-technology-stack   Source File: AspectJProxyFactory.java    License: MIT License 5 votes vote down vote up
/**
 * Add all {@link Advisor Advisors} from the supplied {@link MetadataAwareAspectInstanceFactory}
 * to the current chain. Exposes any special purpose {@link Advisor Advisors} if needed.
 * @see AspectJProxyUtils#makeAdvisorChainAspectJCapableIfNecessary(List)
 */
private void addAdvisorsFromAspectInstanceFactory(MetadataAwareAspectInstanceFactory instanceFactory) {
	List<Advisor> advisors = this.aspectFactory.getAdvisors(instanceFactory);
	Class<?> targetClass = getTargetClass();
	Assert.state(targetClass != null, "Unresolvable target class");
	advisors = AopUtils.findAdvisorsThatCanApply(advisors, targetClass);
	AspectJProxyUtils.makeAdvisorChainAspectJCapableIfNecessary(advisors);
	AnnotationAwareOrderComparator.sort(advisors);
	addAdvisors(advisors);
}
 
Example 3
Source Project: lams   Source File: AspectJProxyFactory.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Add all {@link Advisor Advisors} from the supplied {@link MetadataAwareAspectInstanceFactory}
 * to the current chain. Exposes any special purpose {@link Advisor Advisors} if needed.
 * @see AspectJProxyUtils#makeAdvisorChainAspectJCapableIfNecessary(List)
 */
private void addAdvisorsFromAspectInstanceFactory(MetadataAwareAspectInstanceFactory instanceFactory) {
	List<Advisor> advisors = this.aspectFactory.getAdvisors(instanceFactory);
	advisors = AopUtils.findAdvisorsThatCanApply(advisors, getTargetClass());
	AspectJProxyUtils.makeAdvisorChainAspectJCapableIfNecessary(advisors);
	AnnotationAwareOrderComparator.sort(advisors);
	addAdvisors(advisors);
}
 
Example 4
Source Project: spring4-understanding   Source File: AspectJProxyFactory.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Add all {@link Advisor Advisors} from the supplied {@link MetadataAwareAspectInstanceFactory}
 * to the current chain. Exposes any special purpose {@link Advisor Advisors} if needed.
 * @see AspectJProxyUtils#makeAdvisorChainAspectJCapableIfNecessary(List)
 */
private void addAdvisorsFromAspectInstanceFactory(MetadataAwareAspectInstanceFactory instanceFactory) {
	List<Advisor> advisors = this.aspectFactory.getAdvisors(instanceFactory);
	advisors = AopUtils.findAdvisorsThatCanApply(advisors, getTargetClass());
	AspectJProxyUtils.makeAdvisorChainAspectJCapableIfNecessary(advisors);
	AnnotationAwareOrderComparator.sort(advisors);
	addAdvisors(advisors);
}
 
Example 5
/**
 * Adds an {@link ExposeInvocationInterceptor} to the beginning of the advice chain.
 * These additional advices are needed when using AspectJ expression pointcuts
 * and when using AspectJ-style advice.
 */
@Override
protected void extendAdvisors(List<Advisor> candidateAdvisors) {
	AspectJProxyUtils.makeAdvisorChainAspectJCapableIfNecessary(candidateAdvisors);
}
 
Example 6
/**
 * Adds an {@link ExposeInvocationInterceptor} to the beginning of the advice chain.
 * These additional advices are needed when using AspectJ expression pointcuts
 * and when using AspectJ-style advice.
 */
@Override
protected void extendAdvisors(List<Advisor> candidateAdvisors) {
	AspectJProxyUtils.makeAdvisorChainAspectJCapableIfNecessary(candidateAdvisors);
}
 
Example 7
/**
 * Adds an {@link ExposeInvocationInterceptor} to the beginning of the advice chain.
 * These additional advices are needed when using AspectJ expression pointcuts
 * and when using AspectJ-style advice.
 */
@Override
protected void extendAdvisors(List<Advisor> candidateAdvisors) {
	AspectJProxyUtils.makeAdvisorChainAspectJCapableIfNecessary(candidateAdvisors);
}
 
Example 8
/**
 * Adds an {@link ExposeInvocationInterceptor} to the beginning of the advice chain.
 * These additional advices are needed when using AspectJ expression pointcuts
 * and when using AspectJ-style advice.
 */
@Override
protected void extendAdvisors(List<Advisor> candidateAdvisors) {
	AspectJProxyUtils.makeAdvisorChainAspectJCapableIfNecessary(candidateAdvisors);
}