类 Handler
java.lang.Object
cn.taketoday.bytecode.Handler
Information about an exception handler. Corresponds to an element of the exception_table array of
a Code attribute, as defined in the Java Virtual Machine Specification (JVMS). Handler instances
can be chained together, with their
nextHandler field, to describe a full JVMS
exception_table array.- 作者:
- Eric Bruneton
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明final intThe catch_type field of this JVMS exception_table entry.final StringThe internal name of the type of exceptions handled by this handler, or null to catch any exceptions.final LabelThe end_pc field of this JVMS exception_table entry.final LabelThe handler_pc field of this JVMS exception_table entry.The next exception handler.final LabelThe start_pc field of this JVMS exception_table entry. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明(专用程序包) static intgetExceptionTableLength(Handler firstHandler) Returns the number of elements of the Handler list that begins with the given element.(专用程序包) static intgetExceptionTableSize(Handler firstHandler) Returns the size in bytes of the JVMS exception_table corresponding to the Handler list that begins with the given element.(专用程序包) static voidputExceptionTable(Handler firstHandler, ByteVector output) Puts the JVMS exception_table corresponding to the Handler list that begins with the given element.(专用程序包) static HandlerremoveRange(Handler firstHandler, Label start, Label end) Removes the range between start and end from the Handler list that begins with the given element.
-
字段详细资料
-
startPc
The start_pc field of this JVMS exception_table entry. Corresponds to the beginning of the exception handler's scope (inclusive). -
endPc
The end_pc field of this JVMS exception_table entry. Corresponds to the end of the exception handler's scope (exclusive). -
handlerPc
The handler_pc field of this JVMS exception_table entry. Corresponding to the beginning of the exception handler's code. -
catchType
public final int catchTypeThe catch_type field of this JVMS exception_table entry. This is the constant pool index of the internal name of the type of exceptions handled by this handler, or 0 to catch any exceptions. -
catchTypeDescriptor
The internal name of the type of exceptions handled by this handler, or null to catch any exceptions. -
nextHandler
The next exception handler.
-
-
构造器详细资料
-
Handler
Constructs a new Handler.- 参数:
startPc- the start_pc field of this JVMS exception_table entry.endPc- the end_pc field of this JVMS exception_table entry.handlerPc- the handler_pc field of this JVMS exception_table entry.catchType- The catch_type field of this JVMS exception_table entry.catchTypeDescriptor- The internal name of the type of exceptions handled by this handler, or null to catch any exceptions.
-
Handler
Constructs a new Handler from the given one, with a different scope.- 参数:
handler- an existing Handler.startPc- the start_pc field of this JVMS exception_table entry.endPc- the end_pc field of this JVMS exception_table entry.
-
-
方法详细资料
-
removeRange
Removes the range between start and end from the Handler list that begins with the given element.- 参数:
firstHandler- the beginning of a Handler list. May be null.start- the start of the range to be removed.end- the end of the range to be removed. Maybe null.- 返回:
- the exception handler list with the start-end range removed.
-
getExceptionTableLength
Returns the number of elements of the Handler list that begins with the given element.- 参数:
firstHandler- the beginning of a Handler list. May be null.- 返回:
- the number of elements of the Handler list that begins with 'handler'.
-
getExceptionTableSize
Returns the size in bytes of the JVMS exception_table corresponding to the Handler list that begins with the given element. This includes the exception_table_length field.- 参数:
firstHandler- the beginning of a Handler list. May be null.- 返回:
- the size in bytes of the exception_table_length and exception_table structures.
-
putExceptionTable
Puts the JVMS exception_table corresponding to the Handler list that begins with the given element. This includes the exception_table_length field.- 参数:
firstHandler- the beginning of a Handler list. May be null.output- where the exception_table_length and exception_table structures must be put.
-