KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > tags > databinding > invoke > ObjectNotFoundException


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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  * $Header:$
17  */

18 package org.apache.beehive.netui.tags.databinding.invoke;
19
20 /**
21  * An exception thrown when an object on which to invoke a method can not
22  * be found. The {@link CallMethod#resolveObject()} call throws this exception.
23  */

24 public class ObjectNotFoundException
25         extends Exception JavaDoc {
26
27     private String JavaDoc _objectName = null;
28
29     /**
30      * Construct an ObjectNotFoundException.
31      */

32     public ObjectNotFoundException() {
33         super();
34     }
35
36     /**
37      * Construct an ObjectNotFoundException with the given message.
38      *
39      * @param message a String containing the text of the exception message
40      */

41     public ObjectNotFoundException(String JavaDoc message) {
42         super(message);
43     }
44
45     /**
46      * Construct an ObjectNotFoundException with the given cause
47      *
48      * @param cause a <code>Throwable</code> that interfered with the normal lookup of an object.
49      */

50     public ObjectNotFoundException(Throwable JavaDoc cause) {
51         super(cause);
52     }
53
54     /**
55      * Construct an ObjectNotFoundException with the given <code>message</code> and <code>cause</code>.
56      *
57      * @param message a String containing the text of the exception message
58      * @param cause a <code>Throwable</code> that interfered with the normal lookup of an object.
59      */

60     public ObjectNotFoundException(String JavaDoc message, Throwable JavaDoc cause) {
61         super(message, cause);
62     }
63
64     /**
65      * Construct an ObjectNotFoundException with the given <code>message</code>, <code>cause</code>, and <code>objectName</code>.
66      *
67      * @param message a String containing the text of the exception message
68      * @param cause a <code>Throwable</code> that interfered with the normal lookup of an object.
69      * @param objectName the identifier of the object which could not be looked-up.
70      */

71     public ObjectNotFoundException(String JavaDoc message, Throwable JavaDoc cause, String JavaDoc objectName) {
72         super(message, cause);
73         _objectName = objectName;
74     }
75
76     /**
77      * Get the name of the object whose lookup failed.
78      *
79      * @return the String name
80      */

81     public String JavaDoc getObjectName() {
82         return _objectName;
83     }
84 }
85
Popular Tags