Package org.aspectj.lang

Examples of org.aspectj.lang.ProceedingJoinPoint


    MockServiceImpl service = new MockServiceImpl();
    Method method = MockService.class.getMethod("evalauteMultiArg",
        String.class, String.class);

    ProceedingJoinPoint pjp = ProceedingJoinPointFactory.create(service,
        service, MockService.class, method, "valueA", "valueB");

    CacheableObjectKeyFactory[] keyFactories = {
        new DefaultCacheableObjectKeyFactory(),
        new DefaultCacheableObjectKeyFactory()};
View Full Code Here


     * This method is called to implicitly associate the closure with the joinpoint
     * as required for @AJ aspect proceed()
     */
    public ProceedingJoinPoint linkClosureAndJoinPoint() {
        //TODO is this cast safe ?
        ProceedingJoinPoint jp = (ProceedingJoinPoint)state[state.length-1];
        jp.set$AroundClosure(this);
        return jp;
    }
View Full Code Here

  @Test
  public void testMonitor() throws Throwable {
    JamonMonitorFactory monitorFactory = new JamonMonitorFactory();
    RepositoryPerformanceMonitor performanceMonitor = new RepositoryPerformanceMonitor(monitorFactory);
    Signature signature = EasyMock.createMock(Signature.class);
    ProceedingJoinPoint targetMethod = EasyMock.createMock(ProceedingJoinPoint.class);

    EasyMock.expect(targetMethod.getSignature()).andReturn(signature);
    EasyMock.expect(signature.getDeclaringType()).andReturn(Object.class);
    EasyMock.expect(signature.getName()).andReturn("hashCode");
    EasyMock.expect(targetMethod.proceed()).andReturn(new Object());

    EasyMock.replay(signature, targetMethod);
    performanceMonitor.monitor(targetMethod);
    EasyMock.verify(signature, targetMethod);
  }
View Full Code Here

  public void testMonitor() throws Throwable {
    JamonMonitorFactory monitorFactory = new JamonMonitorFactory();
    RepositoryPerformanceMonitor performanceMonitor = new RepositoryPerformanceMonitor(
        monitorFactory);
    Signature signature = EasyMock.createMock(Signature.class);
    ProceedingJoinPoint targetMethod = EasyMock
        .createMock(ProceedingJoinPoint.class);

    EasyMock.expect(targetMethod.getSignature()).andReturn(signature);
    EasyMock.expect(signature.getDeclaringType()).andReturn(Object.class);
    EasyMock.expect(signature.getName()).andReturn("hashCode");
    EasyMock.expect(targetMethod.proceed()).andReturn(new Object());

    EasyMock.replay(signature, targetMethod);
    performanceMonitor.monitor(targetMethod);
    EasyMock.verify(signature, targetMethod);
  }
View Full Code Here

  public void testMonitor() throws Throwable {
    JamonMonitorFactory monitorFactory = new JamonMonitorFactory();
    RepositoryPerformanceMonitor performanceMonitor = new RepositoryPerformanceMonitor(monitorFactory);
    Signature signature = EasyMock.createMock(Signature.class);
    ProceedingJoinPoint targetMethod = EasyMock.createMock(ProceedingJoinPoint.class);

    EasyMock.expect(targetMethod.getSignature()).andReturn(signature);
    EasyMock.expect(signature.getDeclaringType()).andReturn(Object.class);
    EasyMock.expect(signature.getName()).andReturn("hashCode");
    EasyMock.expect(targetMethod.proceed()).andReturn(new Object());

    EasyMock.replay(signature, targetMethod);
    performanceMonitor.monitor(targetMethod);
    EasyMock.verify(signature, targetMethod);
  }
View Full Code Here

TOP

Related Classes of org.aspectj.lang.ProceedingJoinPoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.