01: /*****************************************************************************
02: * Copyright (c) PicoContainer Organization. All rights reserved. *
03: * ------------------------------------------------------------------------- *
04: * The software in this package is published under the terms of the BSD *
05: * style license a copy of which has been included with this distribution in *
06: * the LICENSE.txt file. *
07: * *
08: *****************************************************************************/package org.picocontainer;
09:
10: import java.lang.reflect.Method;
11:
12: public class PicoLifecycleException extends PicoException {
13:
14: private final Method method;
15: private final Object instance;
16:
17: public PicoLifecycleException(final Method method,
18: final Object instance, final RuntimeException cause) {
19: super (cause);
20: this .method = method;
21: this .instance = instance;
22: }
23:
24: public Method getMethod() {
25: return method;
26: }
27:
28: public Object getInstance() {
29: return instance;
30: }
31:
32: public String getMessage() {
33: return "PicoLifecycleException: method '" + method
34: + "', instance '" + instance + ", "
35: + super.getMessage();
36: }
37:
38: }
|