List of usage examples for org.aspectj.lang.reflect PerClauseKind PERTHIS
PerClauseKind PERTHIS
To view the source code for org.aspectj.lang.reflect PerClauseKind PERTHIS.
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". *//* w ww . j a v a 2s . 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 testPerThisAspect() { AspectMetadata am = new AspectMetadata(PerThisAspect.class, "someBean"); assertTrue(am.isPerThisOrPerTarget()); assertNotSame(Pointcut.TRUE, am.getPerClausePointcut()); assertEquals(PerClauseKind.PERTHIS, am.getAjType().getPerClause().getKind()); }