List of usage examples for org.aspectj.lang.reflect PerClauseKind PERTARGET
PerClauseKind PERTARGET
To view the source code for org.aspectj.lang.reflect PerClauseKind PERTARGET.
Click Source Link
From source file:org.springframework.aop.aspectj.annotation.AspectMetadata.java
License:Apache License
/** * Return whether the aspect is defined as "perthis" or "pertarget". *//* ww w .ja v a2 s.c o m*/ public boolean isPerThisOrPerTarget() { PerClauseKind kind = getAjType().getPerClause().getKind(); return (kind == PerClauseKind.PERTARGET || kind == PerClauseKind.PERTHIS); }
From source file:org.springframework.aop.aspectj.annotation.AspectMetadataTests.java
License:Apache License
@Test public void testPerTargetAspect() { AspectMetadata am = new AspectMetadata(PerTargetAspect.class, "someBean"); assertTrue(am.isPerThisOrPerTarget()); assertNotSame(Pointcut.TRUE, am.getPerClausePointcut()); assertEquals(PerClauseKind.PERTARGET, am.getAjType().getPerClause().getKind()); }