01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * 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: * Represents the AOP Alliance <code>MethodInvocation</code>.
25: *
26: * @author Ben Alex
27: * @version $Id: SimpleMethodInvocation.java 1496 2006-05-23 13:38:33Z benalex $
28: */
29: public class SimpleMethodInvocation implements MethodInvocation {
30: //~ Instance fields ================================================================================================
31:
32: private Method method;
33: private Object[] arguments;
34:
35: //~ Constructors ===================================================================================================
36:
37: public SimpleMethodInvocation(Method method, Object[] arguments) {
38: this .method = method;
39: this .arguments = arguments;
40: }
41:
42: public SimpleMethodInvocation() {
43: }
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(
57: "mock method not implemented");
58: }
59:
60: public Object getThis() {
61: throw new UnsupportedOperationException(
62: "mock method not implemented");
63: }
64:
65: public Object proceed() throws Throwable {
66: throw new UnsupportedOperationException(
67: "mock method not implemented");
68: }
69: }
|