01: /*
02: * Copyright 2004-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.springframework.binding.method;
17:
18: import org.springframework.core.NestedRuntimeException;
19:
20: /**
21: * Thrown when a method key could not be resolved to an invokable java Method on
22: * a Class.
23: *
24: * @author Keith Donald
25: */
26: public class InvalidMethodKeyException extends NestedRuntimeException {
27:
28: /**
29: * The method key that could not be resolved.
30: */
31: private MethodKey methodKey;
32:
33: /**
34: * Creates an exception signaling an invalid method signature.
35: * @param methodKey the class method key
36: * @param cause the cause
37: */
38: public InvalidMethodKeyException(MethodKey methodKey,
39: Exception cause) {
40: super ("Could not resolve method with key " + methodKey, cause);
41: this .methodKey = methodKey;
42: }
43:
44: /**
45: * Returns the invalid method key.
46: * @return the method key.
47: */
48: public MethodKey getMethodKey() {
49: return methodKey;
50: }
51: }
|