KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > picocontainer > PicoLifecycleException


1 /*****************************************************************************
2  * Copyright (c) PicoContainer Organization. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  * *
8  *****************************************************************************/

9
10 package org.picocontainer;
11
12 import java.lang.reflect.Method JavaDoc;
13
14 public class PicoLifecycleException extends PicoException {
15
16     private final Method JavaDoc method;
17     private final Object JavaDoc instance;
18
19     public PicoLifecycleException(final Method JavaDoc method, final Object JavaDoc instance, final RuntimeException JavaDoc cause) {
20         super(cause);
21         this.method = method;
22         this.instance = instance;
23     }
24
25     public Method JavaDoc getMethod() {
26         return method;
27     }
28
29     public Object JavaDoc getInstance() {
30         return instance;
31     }
32
33     public String JavaDoc getMessage() {
34         return "PicoLifecycleException: method '" + method + "', instance '"+ instance + ", " + super.getMessage();
35     }
36
37 }
38
Popular Tags