亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? aspectjexpressionpointcut.java

?? spring framework 2.5.4源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Copyright 2002-2008 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.aop.aspectj;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.patterns.NamePattern;
import org.aspectj.weaver.reflect.ReflectionWorld;
import org.aspectj.weaver.tools.ContextBasedMatcher;
import org.aspectj.weaver.tools.FuzzyBoolean;
import org.aspectj.weaver.tools.JoinPointMatch;
import org.aspectj.weaver.tools.MatchingContext;
import org.aspectj.weaver.tools.PointcutDesignatorHandler;
import org.aspectj.weaver.tools.PointcutExpression;
import org.aspectj.weaver.tools.PointcutParameter;
import org.aspectj.weaver.tools.PointcutParser;
import org.aspectj.weaver.tools.PointcutPrimitive;
import org.aspectj.weaver.tools.ShadowMatch;

import org.springframework.aop.ClassFilter;
import org.springframework.aop.IntroductionAwareMethodMatcher;
import org.springframework.aop.MethodMatcher;
import org.springframework.aop.ProxyMethodInvocation;
import org.springframework.aop.framework.autoproxy.ProxyCreationContext;
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
import org.springframework.aop.support.AbstractExpressionPointcut;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;

/**
 * Spring {@link org.springframework.aop.Pointcut} implementation
 * that uses the AspectJ weaver to evaluate a pointcut expression.
 *
 * <p>The pointcut expression value is an AspectJ expression. This can
 * reference other pointcuts and use composition and other operations.
 *
 * <p>Naturally, as this is to be processed by Spring AOP's proxy-based model,
 * only method execution pointcuts are supported.
 *
 * @author Rob Harrop
 * @author Adrian Colyer
 * @author Rod Johnson
 * @author Juergen Hoeller
 * @author Ramnivas Laddad
 * @since 2.0
 */
public class AspectJExpressionPointcut extends AbstractExpressionPointcut
		implements ClassFilter, IntroductionAwareMethodMatcher, BeanFactoryAware {

	private static final Set DEFAULT_SUPPORTED_PRIMITIVES = new HashSet();

	static {
		DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.EXECUTION);
		DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.ARGS);
		DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.REFERENCE);
		DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.THIS);
		DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.TARGET);
		DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.WITHIN);
		DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_ANNOTATION);
		DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_WITHIN);
		DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_ARGS);
		DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_TARGET);
	}


	private static final Log logger = LogFactory.getLog(AspectJExpressionPointcut.class);

	private final Map shadowMapCache = new HashMap();

	private PointcutParser pointcutParser;

	private Class pointcutDeclarationScope;

	private String[] pointcutParameterNames = new String[0];

	private Class[] pointcutParameterTypes = new Class[0];

	private BeanFactory beanFactory;

	private PointcutExpression pointcutExpression;


	/**
	 * Create a new default AspectJExpressionPointcut.
	 */
	public AspectJExpressionPointcut() {
		this(DEFAULT_SUPPORTED_PRIMITIVES);
	}

	/**
	 * Create a new AspectJExpressionPointcut with the given supported primitives.
	 * @param supportedPrimitives Set of {@link org.aspectj.weaver.tools.PointcutPrimitive}
	 * instances
	 */
	public AspectJExpressionPointcut(Set supportedPrimitives) {
		this.pointcutParser =
				PointcutParser.getPointcutParserSupportingSpecifiedPrimitivesAndUsingContextClassloaderForResolution(
						supportedPrimitives);
		this.pointcutParser.registerPointcutDesignatorHandler(new BeanNamePointcutDesignatorHandler());
	}

	/**
	 * Create a new AspectJExpressionPointcut with the given settings.
	 * @param declarationScope the declaration scope for the pointcut
	 * @param paramNames the parameter names for the pointcut
	 * @param paramTypes the parameter types for the pointcut
	 */
	public AspectJExpressionPointcut(Class declarationScope, String[] paramNames, Class[] paramTypes) {
		this(DEFAULT_SUPPORTED_PRIMITIVES);
		this.pointcutDeclarationScope = declarationScope;
		if (paramNames.length != paramTypes.length) {
			throw new IllegalStateException(
					"Number of pointcut parameter names must match number of pointcut parameter types");
		}
		this.pointcutParameterNames = paramNames;
		this.pointcutParameterTypes = paramTypes;
	}


	/**
	 * Set the declaration scope for the pointcut.
	 */
	public void setPointcutDeclarationScope(Class pointcutDeclarationScope) {
		this.pointcutDeclarationScope = pointcutDeclarationScope;
	}

	/**
	 * Set the parameter names for the pointcut.
	 */
	public void setParameterNames(String[] names) {
		this.pointcutParameterNames = names;
	}

	/**
	 * Set the parameter types for the pointcut.
	 */
	public void setParameterTypes(Class[] types) {
		this.pointcutParameterTypes = types;
	}

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


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

	public MethodMatcher getMethodMatcher() {
		checkReadyToMatch();
		return this;
	}


	/**
	 * Check whether this pointcut is ready to match,
	 * lazily building the underlying AspectJ pointcut expression.
	 */
	private void checkReadyToMatch() {
		if (getExpression() == null) {
			throw new IllegalStateException("Must set property 'expression' before attempting to match");
		}
		if (this.pointcutExpression == null) {
			this.pointcutExpression = buildPointcutExpression();
		}
	}

	/**
	 * Build the underlying AspectJ pointcut expression.
	 */
	private PointcutExpression buildPointcutExpression() {
		PointcutParameter[] pointcutParameters = new PointcutParameter[this.pointcutParameterNames.length];
		for (int i = 0; i < pointcutParameters.length; i++) {
			pointcutParameters[i] = this.pointcutParser.createPointcutParameter(
					this.pointcutParameterNames[i], this.pointcutParameterTypes[i]);
		}
		return this.pointcutParser.parsePointcutExpression(
				replaceBooleanOperators(getExpression()), this.pointcutDeclarationScope, pointcutParameters);
	}

	/**
	 * If a pointcut expression has been specified in XML, the user cannot
	 * write <code>and</code> as "&&" (though &amp;&amp; will work).
	 * We also allow <code>and</code> between two pointcut sub-expressions.
	 * <p>This method converts back to <code>&&</code> for the AspectJ pointcut parser.
	 */
	private String replaceBooleanOperators(String pcExpr) {
		pcExpr = StringUtils.replace(pcExpr," and "," && ");
		pcExpr = StringUtils.replace(pcExpr, " or ", " || ");
		pcExpr = StringUtils.replace(pcExpr, " not ", " ! ");
		return pcExpr;
	}

	/**
	 * Return the underlying AspectJ pointcut expression.
	 */
	public PointcutExpression getPointcutExpression() {
		checkReadyToMatch();
		return this.pointcutExpression;
	}


	public boolean matches(Class targetClass) {
		checkReadyToMatch();
		try {
			return this.pointcutExpression.couldMatchJoinPointsInType(targetClass);
		}
		catch (BCException ex) {
			logger.debug("PointcutExpression matching rejected target class", ex);
			return false;
		}
	}

	public boolean matches(Method method, Class targetClass, boolean beanHasIntroductions) {
		checkReadyToMatch();
		Method targetMethod = AopUtils.getMostSpecificMethod(method, targetClass);
		ShadowMatch shadowMatch = null;
		try {
			shadowMatch = getShadowMatch(targetMethod, method);
		}
		catch (ReflectionWorld.ReflectionWorldException ex) {
			// Could neither introspect the target class nor the proxy class ->
			// let's simply consider this method as non-matching.
			return false;
		}

		// Special handling for this, target, @this, @target, @annotation
		// in Spring - we can optimize since we know we have exactly this class,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产偷国产偷精品高清尤物 | 久久综合色婷婷| 视频一区二区中文字幕| 7878成人国产在线观看| 日本三级亚洲精品| 久久天堂av综合合色蜜桃网| 国产一二三精品| 国产精品久久久久久久裸模| 91免费国产在线观看| 亚洲精品精品亚洲| 欧美精品电影在线播放| 久久99热这里只有精品| 日本一区二区三区电影| 99精品视频一区二区| 亚洲一区二区三区不卡国产欧美| 欧美日韩不卡一区二区| 国产裸体歌舞团一区二区| 国产精品短视频| 欧美日韩国产另类不卡| 精品一区二区国语对白| 国产精品久久久久久久久果冻传媒| 一道本成人在线| 蜜桃在线一区二区三区| 欧美激情中文不卡| 欧美视频一区二| 久久精品二区亚洲w码| 国产精品福利一区二区三区| 欧美日韩中文字幕一区| 国产一区二区三区电影在线观看| 亚洲精品福利视频网站| 日韩美女一区二区三区| 972aa.com艺术欧美| 视频一区免费在线观看| 亚洲国产精华液网站w| 欧美精品一级二级三级| 丰满少妇久久久久久久| 视频一区二区中文字幕| 国产精品美女久久久久高潮| 欧美日韩国产123区| 大尺度一区二区| 青青青伊人色综合久久| 一区在线播放视频| 精品99久久久久久| 91官网在线观看| 懂色av中文字幕一区二区三区 | 国产不卡免费视频| 亚洲h在线观看| 国产精品亲子伦对白| 欧美肥胖老妇做爰| 日本福利一区二区| 成人激情图片网| 久草这里只有精品视频| 亚洲成在线观看| 亚洲欧洲另类国产综合| 久久久久国产精品厨房| 91精品国产欧美一区二区成人 | 亚洲一区二区成人在线观看| 久久免费美女视频| 欧美变态凌虐bdsm| 在线播放亚洲一区| 欧美午夜免费电影| 99精品久久只有精品| 国产成人8x视频一区二区| 精品在线观看视频| 久久99精品久久久| 麻豆成人久久精品二区三区红| 亚洲一区二区视频| 国产精品天干天干在线综合| 91精品欧美一区二区三区综合在| 9l国产精品久久久久麻豆| 国产精品美女久久久久aⅴ国产馆| 欧美精品一区二区三区在线| 欧美亚洲一区二区在线| 成人一区二区三区在线观看| 久久er精品视频| 日韩精品1区2区3区| 亚洲精品第1页| 自拍偷拍国产精品| 久久午夜国产精品| 国产欧美精品区一区二区三区| 日韩美女在线视频| 91精品欧美久久久久久动漫| 欧美亚洲高清一区| 色婷婷亚洲精品| 成人aaaa免费全部观看| 国产精品99久久久久久似苏梦涵| 日本人妖一区二区| 蜜桃久久精品一区二区| 免费av成人在线| 日韩电影免费在线| 亚洲一区二区三区影院| 亚洲精品免费看| 一区二区三区四区五区视频在线观看| 国产欧美精品一区二区色综合朱莉| 精品国产欧美一区二区| 欧美高清性hdvideosex| 欧美成人一区二区| 欧美大黄免费观看| 欧美成人三级电影在线| 欧美一激情一区二区三区| 日本韩国一区二区| 色成年激情久久综合| 欧美在线播放高清精品| 在线看国产一区| 欧美日韩国产免费一区二区| 欧美日本一区二区三区| 欧美高清精品3d| 日韩欧美黄色影院| 日韩视频一区二区在线观看| 国产日韩欧美精品综合| 国产精品视频一二三区| 亚洲精品日韩综合观看成人91| 亚洲国产精品尤物yw在线观看| 卡一卡二国产精品 | 国产又黄又大久久| 成人午夜免费av| 欧美精品黑人性xxxx| 日韩欧美一二区| 一区二区三区在线视频免费| 午夜久久久久久电影| 国产超碰在线一区| 日本精品视频一区二区三区| 日韩无一区二区| 国产精品系列在线| 免费一级片91| 国产激情精品久久久第一区二区| 欧美在线免费播放| 精品三级在线观看| 一级做a爱片久久| 91精品国产色综合久久不卡蜜臀| 日本一区二区三区在线观看| 综合在线观看色| 国产在线国偷精品产拍免费yy| 国产不卡视频一区| 精品欧美乱码久久久久久| 国产精品麻豆99久久久久久| 午夜精品福利一区二区三区av | 国产成人自拍网| 在线播放中文字幕一区| 国产精品日日摸夜夜摸av| 久久精品国产亚洲5555| 不卡一区二区三区四区| 久久综合狠狠综合久久综合88| 亚洲品质自拍视频网站| 国产a视频精品免费观看| 69久久99精品久久久久婷婷| 亚洲美女偷拍久久| 国产老女人精品毛片久久| 欧美一区二区日韩一区二区| 中文字幕乱码久久午夜不卡| 久久成人羞羞网站| 欧美色男人天堂| 中文字幕中文在线不卡住| 极品少妇xxxx精品少妇偷拍| 欧美视频一区在线| 亚洲天堂成人在线观看| 成人理论电影网| 精品播放一区二区| 日本一道高清亚洲日美韩| 欧美日韩国产美| 亚洲免费视频中文字幕| 高清国产一区二区三区| 欧美电影精品一区二区| 三级亚洲高清视频| 不卡视频在线看| 久久精品欧美日韩精品| 麻豆成人91精品二区三区| 欧美精品免费视频| 亚洲免费电影在线| 紧缚奴在线一区二区三区| 久久精品日韩一区二区三区| 亚洲自拍偷拍麻豆| 91啪亚洲精品| 亚洲午夜精品在线| 欧美亚洲综合另类| 亚洲成av人片在www色猫咪| 色婷婷av一区二区三区之一色屋| 亚洲激情网站免费观看| 99久久久国产精品免费蜜臀| 亚洲人成网站精品片在线观看| 成人中文字幕电影| 自拍偷拍国产精品| 色偷偷88欧美精品久久久| 亚洲高清免费在线| 日韩欧美国产麻豆| 狠狠色伊人亚洲综合成人| 久久久久久综合| 国产在线精品一区二区| 国产欧美一区二区三区网站| 国产一区二区日韩精品| 久久久久久电影| 色偷偷久久人人79超碰人人澡| 亚洲精品欧美激情| 日韩一区二区免费高清| 美日韩黄色大片| 亚洲国产高清在线| yourporn久久国产精品| 亚洲自拍另类综合| 91精品国产综合久久国产大片| 亚洲精品免费一二三区|