001 /* 002 003 Copyright (C) 2001 Renaud Pawlak, Laurent Martelli 004 005 This program is free software; you can redistribute it and/or modify 006 it under the terms of the GNU Lesser General Public License as 007 published by the Free Software Foundation; either version 2 of the 008 License, or (at your option) any later version. 009 010 This program is distributed in the hope that it will be useful, 011 but WITHOUT ANY WARRANTY; without even the implied warranty of 012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 GNU Lesser General Public License for more details. 014 015 You should have received a copy of the GNU Lesser General Public License 016 along with this program; if not, write to the Free Software 017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 018 019 package org.objectweb.jac.core.rtti; 020 021 /** 022 * This exception is thrown when the user tries to construct a new 023 * meta item that is not matching the 024 * <code>java.lang.reflect</code> element it delegates to.<p> 025 * 026 * @author <a href="mailto:laurent@aopsys.com">Laurent Martelli</a> 027 */ 028 public class InvalidDelegateException extends Exception { 029 /** 030 * @param delegate the delegate that caused the exception 031 * @param message a message explaining the error 032 */ 033 public InvalidDelegateException(Object delegate, String message) { 034 super(delegate+": "+message); 035 this.delegate = delegate; 036 } 037 Object delegate; 038 public Object getDelegate() { 039 return delegate; 040 } 041 } 042 043