當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。