KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > julia > asm > VisitException


1 /***
2  * Julia: France Telecom's implementation of the Fractal API
3  * Copyright (C) 2001-2002 France Telecom R&D
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: Eric.Bruneton@rd.francetelecom.com
20  *
21  * Author: Eric Bruneton
22  */

23
24 package org.objectweb.fractal.julia.asm;
25
26 /**
27  * Thrown if a problem occurs during the visit of a class or of a method. Since
28  * the methods of the {@link org.objectweb.asm.ClassVisitor} and
29  * {@link org.objectweb.asm.CodeVisitor} interfaces do not declare
30  * exceptions, it is not possible to throw checked exceptions during a visit.
31  * But it is possible to throw a {@link RuntimeException} that
32  * wraps a checked exception. Hence this class.
33  */

34
35 class VisitException extends RuntimeException JavaDoc {
36
37   /**
38    * The exception wrapped in this exception.
39    */

40
41   private final ClassGenerationException exception;
42
43   /**
44    * Constructs a new {@link VisitException} object.
45    *
46    * @param exception the exception to be wrapped in this exception.
47    */

48
49   public VisitException (final ClassGenerationException exception) {
50     this.exception = exception;
51   }
52
53   /**
54    * Returns the exception wrapped in this exception.
55    *
56    * @return the exception wrapped in this exception.
57    */

58
59   public ClassGenerationException getException () {
60     return exception;
61   }
62 }
63
Popular Tags