1 21 package proguard.classfile.attribute; 22 23 import proguard.classfile.*; 24 25 import java.io.*; 26 27 32 public class ExceptionInfo implements VisitorAccepter 33 { 34 public int u2startPC; 35 public int u2endPC; 36 public int u2handlerPC; 37 public int u2catchType; 38 39 42 public Object visitorInfo; 43 44 45 48 public ExceptionInfo() 49 { 50 this(0, 0, 0, 0); 51 } 52 53 54 57 public ExceptionInfo(int u2startPC, 58 int u2endPC, 59 int u2handlerPC, 60 int u2catchType) 61 { 62 this.u2startPC = u2startPC; 63 this.u2endPC = u2endPC; 64 this.u2handlerPC = u2handlerPC; 65 this.u2catchType = u2catchType; 66 } 67 68 69 73 public boolean isApplicable(int instructionOffset) 74 { 75 return instructionOffset >= u2startPC && 76 instructionOffset < u2endPC; 77 } 78 79 80 84 public boolean isApplicable(int startOffset, int endOffset) 85 { 86 return u2startPC < endOffset && 87 u2endPC > startOffset; 88 } 89 90 91 93 public Object getVisitorInfo() 94 { 95 return visitorInfo; 96 } 97 98 public void setVisitorInfo(Object visitorInfo) 99 { 100 this.visitorInfo = visitorInfo; 101 } 102 } 103 | Popular Tags |