当前位置: 首页>>代码示例>>Java>>正文


Java Pointcut类代码示例

本文整理汇总了Java中org.aspectj.lang.annotation.Pointcut的典型用法代码示例。如果您正苦于以下问题:Java Pointcut类的具体用法?Java Pointcut怎么用?Java Pointcut使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Pointcut类属于org.aspectj.lang.annotation包,在下文中一共展示了Pointcut类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loggingPointcut

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
/**
 * Pointcut that matches all repositories, services and Web REST endpoints.
 */
@Pointcut("(within(com.springio.store.repository..*) && @annotation(org.springframework.stereotype.Repository))"+
    " || (within(com.springio.store.service..*) && @annotation(org.springframework.stereotype.Service))"+
    " || (within(com.springio.store.web.rest..*) && @annotation(org.springframework.web.bind.annotation.RestController))")
public void loggingPointcut() {
    // Method is empty as this is just a Pointcut, the implementations are in the advices.
}
 
开发者ID:deepu105,项目名称:spring-io,代码行数:10,代码来源:LoggingAspect.java

示例2: within

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
/**
 * Pointcut that matches all repositories, services and Web REST endpoints.
 */
@Pointcut("within(@org.springframework.stereotype.Repository *)" +
    " || within(@org.springframework.stereotype.Service *)" +
    " || within(@org.springframework.web.bind.annotation.RestController *)")
public void springBeanPointcut() {
    // Method is empty as this is just a Pointcut, the implementations are in the advices.
}
 
开发者ID:oktadeveloper,项目名称:jhipster-microservices-example,代码行数:10,代码来源:LoggingAspect.java

示例3: publicMethod

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
@Pointcut("execution(public * *(..))"
        + " && !execution(String *.toString())"
        + " && !execution(int *.hashCode())"
        + " && !execution(boolean *.canEqual(Object))"
        + " && !execution(boolean *.equals(Object))")
protected void publicMethod() {
}
 
开发者ID:rozidan,项目名称:logger-spring-boot,代码行数:8,代码来源:LoggerInterceptor.java

示例4: within

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
/**
 * Pointcut that matches all Spring beans in the application's main packages.
 */
@Pointcut("within(io.github.pascalgrimaud.qualitoast.repository..*)"+
    " || within(io.github.pascalgrimaud.qualitoast.service..*)"+
    " || within(io.github.pascalgrimaud.qualitoast.web.rest..*)")
public void applicationPackagePointcut() {
    // Method is empty as this is just a Pointcut, the implementations are in the advices.
}
 
开发者ID:pascalgrimaud,项目名称:qualitoast,代码行数:10,代码来源:LoggingAspect.java

示例5: getAdvisorMethods

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
private List<Method> getAdvisorMethods(Class<?> aspectClass) {
	final List<Method> methods = new LinkedList<Method>();
	ReflectionUtils.doWithMethods(aspectClass, new ReflectionUtils.MethodCallback() {
		@Override
		public void doWith(Method method) throws IllegalArgumentException {
			// Exclude pointcuts
			if (AnnotationUtils.getAnnotation(method, Pointcut.class) == null) {
				methods.add(method);
			}
		}
	});
	Collections.sort(methods, METHOD_COMPARATOR);
	return methods;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:ReflectiveAspectJAdvisorFactory.java

示例6: findAspectJAnnotationOnMethod

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
/**
 * Find and return the first AspectJ annotation on the given method
 * (there <i>should</i> only be one anyway...)
 */
@SuppressWarnings("unchecked")
protected static AspectJAnnotation<?> findAspectJAnnotationOnMethod(Method method) {
	Class<?>[] classesToLookFor = new Class<?>[] {
			Before.class, Around.class, After.class, AfterReturning.class, AfterThrowing.class, Pointcut.class};
	for (Class<?> c : classesToLookFor) {
		AspectJAnnotation<?> foundAnnotation = findAnnotation(method, (Class<Annotation>) c);
		if (foundAnnotation != null) {
			return foundAnnotation;
		}
	}
	return null;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:AbstractAspectJAdvisorFactory.java

示例7: anyMethod

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
@Pointcut("execution(* *.*(..))")
public void anyMethod() {
    //pointcut
}
 
开发者ID:Witerium,项目名称:stuffEngine,代码行数:5,代码来源:AuditHandler.java

示例8: methodAnnotated

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
@Pointcut("execution(@com.app.annotation.aspect.DbRealm * *(..))")//方法切入点
public void methodAnnotated() {
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:DbRealmAspect.java

示例9: methodLoggingNotDisabledPointcut

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
@Pointcut("[email protected](io.github.logger.controller.annotation.NoLogging)")
public void methodLoggingNotDisabledPointcut() {
}
 
开发者ID:harshilsharma63,项目名称:controller-logger,代码行数:4,代码来源:GenericControllerAspect.java

示例10: webLog

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
@Pointcut("execution(public * com.mi.module.*.controller..*.*(..))")
public void webLog(){}
 
开发者ID:MIYAOW,项目名称:MI-S,代码行数:3,代码来源:WebRequestLogAspect.java

示例11: methodAnnotated

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
@Pointcut("execution(@com.app.annotation.aspect.MemoryCache * *(..))")//方法切入点
public void methodAnnotated() {
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:MemoryCacheAspect.java

示例12: methodAnnotated

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
@Pointcut("execution(@com.app.annotation.aspect.SingleClick * *(..))")//方法切入点
public void methodAnnotated() {
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:SingleClickAspect.java

示例13: methodAnnotated

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
@Pointcut("execution(@com.app.annotation.aspect.CheckLogin * *(..))")//方法切入点
public void methodAnnotated() {
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:CheckLoginAspect.java

示例14: anyMethod

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
/**
 * Matches any execution of a method
 */
@Pointcut("execution(* *(..))")
public void anyMethod() {
}
 
开发者ID:mcarleio,项目名称:strix,代码行数:7,代码来源:TransactionalAspect.java

示例15: methodAnnotatedWithHookMethod

import org.aspectj.lang.annotation.Pointcut; //导入依赖的package包/类
@Pointcut(POINTCUT_METHOD)
public void methodAnnotatedWithHookMethod() {
}
 
开发者ID:fengzhizi715,项目名称:SAF-AOP,代码行数:4,代码来源:HookMethodAspect.java


注:本文中的org.aspectj.lang.annotation.Pointcut类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。