2 * Copyright (C) 2014, United States Government, as represented by the
3 * Administrator of the National Aeronautics and Space Administration.
6 * The Java Pathfinder core (jpf-core) platform is licensed under the
7 * Apache License, Version 2.0 (the "License"); you may not use this file except
8 * in compliance with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0.
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 package gov.nasa.jpf.vm;
21 * Stores the information about an exception handler.
23 public class ExceptionHandler {
25 * Name of the exception caught. If it is 'null', this means this is an 'any' handler
30 * The first instruction belonging to this handler.
35 * The last instruction belonging to this handler.
40 * The offset of the handler.
45 * Creates a new exception handler.
47 public ExceptionHandler (String n, int b, int e, int h) {
55 * Returns the first instruction in the block.
57 public int getBegin () {
62 * Returns the last instruction in the block.
64 public int getEnd () {
69 * Returns the instruction location for the handler.
71 public int getHandler () {
76 * Returns the name of the exception caught.
78 public String getName () {
84 public String toString() {
85 return "Handler [name="+name+",from="+begin+",to="+end+",target="+handler+"]";