View Javadoc

1   /*************************************************
2    * Copyright (c) Shen Li. All rights reserved.  *
3    * http://joyaop.sourceforge.net                *
4    * -------------------------------------------- *
5    * Distributable under LGPL license.            *
6    * See terms of license at gnu.org.             *
7    ************************************************/
8   package net.sf.joyaop.impl;
9   
10  import net.sf.joyaop.AspectRuntimeException;
11  
12  /***
13   * @author Shen Li
14   */
15  public class OriginalClassInstance implements RuntimeInstance {
16      private static final OriginalClassInstance instance = new OriginalClassInstance();
17  
18      public static OriginalClassInstance instance() {
19          return instance;
20      }
21  
22      public Object getParameter(String name) {
23          throw new AspectRuntimeException("Original class has no parameter.");
24      }
25  
26      public Object invoke(InvocationImpl invocation) throws Throwable {
27          return invocation.getMethodProxy().invokeSuper(invocation.getProxy(), invocation.getArguments());
28      }
29  
30      public boolean allowRecursiveInvocation() {
31          return true;
32      }
33  }