Java源码示例:org.springframework.aop.aspectj.AspectJProxyUtils

示例1
/**
 * 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);
}
 
示例2
/**
 * 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);
}
 
示例3
/**
 * 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);
}
 
示例4
/**
 * 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);
}
 
示例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);
}
 
示例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);
}
 
示例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);
}
 
示例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);
}