View Javadoc
1   package org.codehaus.plexus.util.reflection;
2   
3   /*
4    * Copyright The Codehaus Foundation.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  /**
20   * Exception indicating that an error has occurred while instantiating a class with the Reflector class. This exception
21   * is meant to put a more user-friendly face on the myriad other exceptions throws during reflective object creation.
22   *
23   * @author John Casey
24   */
25  public class ReflectorException extends Exception {
26      @SuppressWarnings({"UnusedDeclaration"})
27      public ReflectorException() {}
28  
29      /**
30       * Create a new ReflectorException with the specified message.
31       *
32       * @param msg The message.
33       */
34      public ReflectorException(String msg) {
35          super(msg);
36      }
37  
38      /**
39       * Create a new ReflectorException with the specified root cause.
40       *
41       * @param root The root cause.
42       */
43      public ReflectorException(Throwable root) {
44          super(root);
45      }
46  
47      /**
48       * Create a new ReflectorException with the specified message and root cause.
49       *
50       * @param msg The message.
51       * @param root The root cause.
52       */
53      public ReflectorException(String msg, Throwable root) {
54          super(msg, root);
55      }
56  }