View Javadoc

1   /* Copyright 2004, 2005 Acegi Technology Pty Limited
2    *
3    * Licensed under the Apache License, Version 2.0 (the "License");
4    * you may not use this file except in compliance with the License.
5    * You may obtain a copy of the License at
6    *
7    *     http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  
16  package org.acegisecurity.util;
17  
18  import org.aopalliance.intercept.MethodInvocation;
19  
20  import java.lang.reflect.AccessibleObject;
21  import java.lang.reflect.Method;
22  
23  
24  /***
25   * Represents the AOP Alliance <code>MethodInvocation</code>.
26   *
27   * @author Ben Alex
28   * @version $Id: SimpleMethodInvocation.java,v 1.1 2005/11/25 04:17:24 benalex Exp $
29   */
30  public class SimpleMethodInvocation implements MethodInvocation {
31      //~ Instance fields ========================================================
32  
33      private Method method;
34      private Object[] arguments;
35  
36      //~ Constructors ===========================================================
37  
38      public SimpleMethodInvocation(Method method, Object[] arguments) {
39          this.method = method;
40          this.arguments = arguments;
41      }
42  
43      public SimpleMethodInvocation() {}
44  
45      //~ Methods ================================================================
46  
47      public Object[] getArguments() {
48          return arguments;
49      }
50  
51      public Method getMethod() {
52          return method;
53      }
54  
55      public AccessibleObject getStaticPart() {
56          throw new UnsupportedOperationException("mock method not implemented");
57      }
58  
59      public Object getThis() {
60          throw new UnsupportedOperationException("mock method not implemented");
61      }
62  
63      public Object proceed() throws Throwable {
64          throw new UnsupportedOperationException("mock method not implemented");
65      }
66  }