本文整理汇总了Java中org.aspectj.weaver.tools.PointcutExpression类的典型用法代码示例。如果您正苦于以下问题:Java PointcutExpression类的具体用法?Java PointcutExpression怎么用?Java PointcutExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PointcutExpression类属于org.aspectj.weaver.tools包,在下文中一共展示了PointcutExpression类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildPointcutExpression
import org.aspectj.weaver.tools.PointcutExpression; //导入依赖的package包/类
/**
* Build the underlying AspectJ pointcut expression.
*/
private PointcutExpression buildPointcutExpression(ClassLoader classLoader) {
PointcutParser parser = initializePointcutParser(classLoader);
PointcutParameter[] pointcutParameters = new PointcutParameter[this.pointcutParameterNames.length];
for (int i = 0; i < pointcutParameters.length; i++) {
pointcutParameters[i] = parser.createPointcutParameter(
this.pointcutParameterNames[i], this.pointcutParameterTypes[i]);
}
return parser.parsePointcutExpression(
replaceBooleanOperators(getExpression()),
this.pointcutDeclarationScope, pointcutParameters);
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:AspectJExpressionPointcut.java
示例2: getFallbackPointcutExpression
import org.aspectj.weaver.tools.PointcutExpression; //导入依赖的package包/类
/**
* Get a new pointcut expression based on a target class's loader rather than the default.
*/
private PointcutExpression getFallbackPointcutExpression(Class<?> targetClass) {
try {
ClassLoader classLoader = targetClass.getClassLoader();
if (classLoader != null && classLoader != this.pointcutClassLoader) {
return buildPointcutExpression(classLoader);
}
}
catch (Throwable ex) {
logger.debug("Failed to create fallback PointcutExpression", ex);
}
return null;
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:AspectJExpressionPointcut.java
示例3: buildPointcutExpression
import org.aspectj.weaver.tools.PointcutExpression; //导入依赖的package包/类
/**
* Build the underlying AspectJ pointcut expression.
*/
private PointcutExpression buildPointcutExpression(ClassLoader classLoader) {
PointcutParser parser = initializePointcutParser(classLoader);
PointcutParameter[] pointcutParameters = new PointcutParameter[this.pointcutParameterNames.length];
for (int i = 0; i < pointcutParameters.length; i++) {
pointcutParameters[i] = parser.createPointcutParameter(
this.pointcutParameterNames[i], this.pointcutParameterTypes[i]);
}
return parser.parsePointcutExpression(replaceBooleanOperators(getExpression()),
this.pointcutDeclarationScope, pointcutParameters);
}
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:14,代码来源:AspectJExpressionPointcut.java
示例4: testAndSubstitution
import org.aspectj.weaver.tools.PointcutExpression; //导入依赖的package包/类
@Test
public void testAndSubstitution() {
Pointcut pc = getPointcut("execution(* *(..)) and args(String)");
PointcutExpression expr =
((AspectJExpressionPointcut) pc).getPointcutExpression();
assertEquals("execution(* *(..)) && args(String)",expr.getPointcutExpression());
}
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:8,代码来源:AspectJExpressionPointcutTests.java
示例5: testMultipleAndSubstitutions
import org.aspectj.weaver.tools.PointcutExpression; //导入依赖的package包/类
@Test
public void testMultipleAndSubstitutions() {
Pointcut pc = getPointcut("execution(* *(..)) and args(String) and this(Object)");
PointcutExpression expr =
((AspectJExpressionPointcut) pc).getPointcutExpression();
assertEquals("execution(* *(..)) && args(String) && this(Object)",expr.getPointcutExpression());
}
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:8,代码来源:AspectJExpressionPointcutTests.java
示例6: getPointcutExpression
import org.aspectj.weaver.tools.PointcutExpression; //导入依赖的package包/类
/**
* Return the underlying AspectJ pointcut expression.
*/
public PointcutExpression getPointcutExpression() {
checkReadyToMatch();
return this.pointcutExpression;
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:AspectJExpressionPointcut.java
示例7: buildPointcutExpression
import org.aspectj.weaver.tools.PointcutExpression; //导入依赖的package包/类
private PointcutExpression buildPointcutExpression() {
return pointcutParser.parsePointcutExpression(expression);
}
开发者ID:greyireland,项目名称:tiny-spring,代码行数:4,代码来源:AspectJExpressionPointcut.java
注:本文中的org.aspectj.weaver.tools.PointcutExpression类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论