CodeExceptionpublic final class CodeException extends Object implements Serializable, Node, com.sun.org.apache.bcel.internal.Constants, CloneableThis class represents an entry in the exception table of the Code
attribute and is used only there. It contains a range in which a
particular exception handler is active. |
Fields Summary |
---|
private int | start_pc | private int | end_pc | private int | handler_pc | private int | catch_type |
Constructors Summary |
---|
public CodeException(CodeException c)Initialize from another object.
this(c.getStartPC(), c.getEndPC(), c.getHandlerPC(), c.getCatchType());
| CodeException(DataInputStream file)Construct object from file stream.
this(file.readUnsignedShort(), file.readUnsignedShort(),
file.readUnsignedShort(), file.readUnsignedShort());
| public CodeException(int start_pc, int end_pc, int handler_pc, int catch_type)
this.start_pc = start_pc;
this.end_pc = end_pc;
this.handler_pc = handler_pc;
this.catch_type = catch_type;
|
Methods Summary |
---|
public void | accept(com.sun.org.apache.bcel.internal.classfile.Visitor v)Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class. I.e., the hierarchy of methods,
fields, attributes, etc. spawns a tree of objects.
v.visitCodeException(this);
| public com.sun.org.apache.bcel.internal.classfile.CodeException | copy()
try {
return (CodeException)clone();
} catch(CloneNotSupportedException e) {}
return null;
| public final void | dump(java.io.DataOutputStream file)Dump code exception to file stream in binary format.
file.writeShort(start_pc);
file.writeShort(end_pc);
file.writeShort(handler_pc);
file.writeShort(catch_type);
| public final int | getCatchType() return catch_type;
| public final int | getEndPC() return end_pc;
| public final int | getHandlerPC() return handler_pc;
| public final int | getStartPC() return start_pc;
| public final void | setCatchType(int catch_type)
this.catch_type = catch_type;
| public final void | setEndPC(int end_pc)
this.end_pc = end_pc;
| public final void | setHandlerPC(int handler_pc)
this.handler_pc = handler_pc;
| public final void | setStartPC(int start_pc)
this.start_pc = start_pc;
| public final java.lang.String | toString()
return "CodeException(start_pc = " + start_pc +
", end_pc = " + end_pc +
", handler_pc = " + handler_pc + ", catch_type = " + catch_type + ")";
| public final java.lang.String | toString(com.sun.org.apache.bcel.internal.classfile.ConstantPool cp, boolean verbose)
String str;
if(catch_type == 0)
str = "<Any exception>(0)";
else
str = Utility.compactClassName(cp.getConstantString(catch_type, CONSTANT_Class), false) +
(verbose? "(" + catch_type + ")" : "");
return start_pc + "\t" + end_pc + "\t" + handler_pc + "\t" + str;
| public final java.lang.String | toString(com.sun.org.apache.bcel.internal.classfile.ConstantPool cp)
return toString(cp, true);
|
|