Search in sources :

Example 1 with PointCut

use of com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut in project pinpoint by naver.

the class AspectInterceptorNoExtendClass method testUtilMethod.

@PointCut
public int testUtilMethod() {
    int result = __testInt();
    utilMethod();
    return result;
}
Also used : JointPoint(com.navercorp.pinpoint.bootstrap.instrument.aspect.JointPoint) PointCut(com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut)

Example 2 with PointCut

use of com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut in project pinpoint by naver.

the class TestAspect method testUtilMethod.

@PointCut
public int testUtilMethod() {
    touchBefore();
    int result = __testInt();
    utilMethod();
    touchAfter();
    return result;
}
Also used : JointPoint(com.navercorp.pinpoint.bootstrap.instrument.aspect.JointPoint) PointCut(com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut)

Example 3 with PointCut

use of com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut in project pinpoint by naver.

the class TestAspect method testInt.

@PointCut
public int testInt() {
    touchBefore();
    final int result = __testInt();
    touchAfter();
    return result;
}
Also used : JointPoint(com.navercorp.pinpoint.bootstrap.instrument.aspect.JointPoint) PointCut(com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut)

Example 4 with PointCut

use of com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut in project pinpoint by naver.

the class ASMMethodNodeAdapterTest method hasAnnotation.

@Test
public void hasAnnotation() throws Exception {
    final String targetClassName = "com.navercorp.pinpoint.profiler.instrument.mock.AnnotationClass";
    final MethodNode methodNode = ASMClassNodeLoader.get(targetClassName, "pointCut");
    ASMMethodNodeAdapter adapter = new ASMMethodNodeAdapter(JavaAssistUtils.javaNameToJvmName(targetClassName), methodNode);
    assertEquals(true, adapter.hasAnnotation(PointCut.class));
    assertEquals(false, adapter.hasAnnotation(JointPoint.class));
}
Also used : PointCut(com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut) MethodNode(org.objectweb.asm.tree.MethodNode) JointPoint(com.navercorp.pinpoint.bootstrap.instrument.aspect.JointPoint) Test(org.junit.Test)

Example 5 with PointCut

use of com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut in project pinpoint by naver.

the class AspectInterceptorExtendSubClass method testUtilMethod.

@PointCut
public int testUtilMethod() {
    int result = __testInt();
    utilMethod();
    return result;
}
Also used : JointPoint(com.navercorp.pinpoint.bootstrap.instrument.aspect.JointPoint) PointCut(com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut)

Aggregations

JointPoint (com.navercorp.pinpoint.bootstrap.instrument.aspect.JointPoint)6 PointCut (com.navercorp.pinpoint.bootstrap.instrument.aspect.PointCut)6 Test (org.junit.Test)1 MethodNode (org.objectweb.asm.tree.MethodNode)1