View Javadoc

1   /**
2    * Copyright 2007 Björn Voß
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5    * use this file except in compliance with the License. You may obtain a copy of
6    * 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, WITHOUT
12   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13   * License for the specific language governing permissions and limitations under
14   * the License.
15   */
16  package net.sf.oxclient.factory;
17  
18  import net.sf.oxclient.GroupwareException;
19  
20  /**
21   * @author Björn Voß
22   *
23   */
24  public class BeanException extends GroupwareException {
25  
26  	private static final long serialVersionUID = -4295614275750996337L;
27  
28  	private final Class<?> beanClass;
29  
30  	public BeanException(
31  			final String message,
32  			final IllegalAccessException e,
33  			final Class<?> beanClass) {
34  		super(message, e);
35  		this.beanClass = beanClass;
36  	}
37  
38  	public BeanException(
39  			final IllegalAccessException e,
40  			final Class<?> beanClass) {
41  		this(e.getMessage(), e, beanClass);
42  	}
43  
44  	protected BeanException(
45  			final String msg,
46  			final Exception e,
47  			final Class<?> beanClass) {
48  		super(msg, e);
49  		this.beanClass = beanClass;
50  	}
51  
52  	public Class<?> getBeanClass() {
53  		return this.beanClass;
54  	}
55  }