1 /* 2 3 Copyright (C) 2001 Renaud Pawlak, Laurent Martelli 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU Lesser General Public License as 7 published by the Free Software Foundation; either version 2 of the 8 License, or (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 18 19 package org.objectweb.jac.core.rtti; 20 21 /** 22 * This exception is thrown when the user tries to construct a new 23 * meta item that is not matching the 24 * <code>java.lang.reflect</code> element it delegates to.<p> 25 * 26 * @author <a HREF="mailto:laurent@aopsys.com">Laurent Martelli</a> 27 */ 28 public class InvalidDelegateException extends Exception { 29 /** 30 * @param delegate the delegate that caused the exception 31 * @param message a message explaining the error 32 */ 33 public InvalidDelegateException(Object delegate, String message) { 34 super(delegate+": "+message); 35 this.delegate = delegate; 36 } 37 Object delegate; 38 public Object getDelegate() { 39 return delegate; 40 } 41 } 42 43 44