KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > umd > cs > findbugs > ba > DataflowAnalysisException


1 /*
2  * Bytecode Analysis Framework
3  * Copyright (C) 2003,2004 University of Maryland
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.1 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
20 package edu.umd.cs.findbugs.ba;
21
22 import org.apache.bcel.generic.InstructionHandle;
23 import org.apache.bcel.generic.MethodGen;
24
25 import edu.umd.cs.findbugs.classfile.CheckedAnalysisException;
26
27 /**
28  * Exception type to indicate a dataflow analysis failure.
29  *
30  * @see Dataflow
31  * @see DataflowAnalysis
32  */

33 public class DataflowAnalysisException extends CheckedAnalysisException {
34     private static final long serialVersionUID = 3690480212240446258L;
35
36     /**
37      * Constructor.
38      */

39     public DataflowAnalysisException() {
40     }
41
42     /**
43      * Constructor.
44      *
45      * @param msg message describing the reason for the exception
46      */

47     public DataflowAnalysisException(String JavaDoc msg) {
48         super(msg);
49     }
50
51     /**
52      * Constructor from message and another Throwable object.
53      *
54      * @param msg message describing the reason for the exception
55      * @param cause a Throwable which is the cause of the exception
56      */

57     public DataflowAnalysisException(String JavaDoc msg, Throwable JavaDoc cause) {
58         super(msg, cause);
59     }
60
61     /**
62      * Constructor from method and instruction.
63      *
64      * @param message reason for the error
65      * @param methodGen the method
66      * @param handle the instruction
67      */

68     public DataflowAnalysisException(String JavaDoc message, MethodGen methodGen, InstructionHandle handle) {
69         super(message + " in " + SignatureConverter.convertMethodSignature(methodGen) + " at " + handle);
70     }
71     
72     /**
73      * Constructor from message, method and instruction, and Throwable object (cause).
74      *
75      * @param message reason for the error
76      * @param methodGen the method
77      * @param handle the instruction
78      * @param cause a Throwable which is the cause of the exception
79      */

80     public DataflowAnalysisException(
81             String JavaDoc message, MethodGen methodGen, InstructionHandle handle, Throwable JavaDoc cause) {
82         this(message, methodGen, handle);
83         this.initCause(cause);
84     }
85 }
86
87 // vim:ts=4
88
Popular Tags