Top Description Fields Constructors Methods
org.eclipse.persistence.internal.libraries.asm

pack-priv final Class Handler

extends Object
Class Inheritance

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.
Author
Eric Bruneton
See Also
JVMS 4.7.3

Field Summary

Modifier and TypeField and Description
pack-priv final int
catchType

The catch_type field of this JVMS exception_table entry.

pack-priv final String
catchTypeDescriptor

The internal name of the type of exceptions handled by this handler, or null to catch any exceptions.

pack-priv final Label
endPc

The end_pc field of this JVMS exception_table entry.

pack-priv final Label
handlerPc

The handler_pc field of this JVMS exception_table entry.

pack-priv Handler
nextHandler

The next exception handler.

pack-priv final Label
startPc

The start_pc field of this JVMS exception_table entry.

Constructor Summary

AccessConstructor and Description
pack-priv
Handler(final Label
the start_pc field of this JVMS exception_table entry.
startPc
,
final Label
the end_pc field of this JVMS exception_table entry.
endPc
,
final Label
the handler_pc field of this JVMS exception_table entry.
handlerPc
,
final int
The catch_type field of this JVMS exception_table entry.
catchType
,
final String
The internal name of the type of exceptions handled by this handler, or null to catch any exceptions.
catchTypeDescriptor
)

Constructs a new Handler.

pack-priv
Handler(final Handler
an existing Handler.
handler
,
final Label
the start_pc field of this JVMS exception_table entry.
startPc
,
final Label
the end_pc field of this JVMS exception_table entry.
endPc
)

Constructs a new Handler from the given one, with a different scope.

Method Summary

Modifier and TypeMethod and Description
pack-priv static int

Returns:

the number of elements of the Handler list that begins with 'handler'.
getExceptionTableLength
(final Handler
the beginning of a Handler list. May be null.
firstHandler
)

Returns the number of elements of the Handler list that begins with the given element.

pack-priv static int

Returns:

the size in bytes of the exception_table_length and exception_table structures.
getExceptionTableSize
(final Handler
the beginning of a Handler list. May be null.
firstHandler
)

Returns the size in bytes of the JVMS exception_table corresponding to the Handler list that begins with the given element.

pack-priv static void
putExceptionTable(final Handler
the beginning of a Handler list. May be null.
firstHandler
,
final ByteVector
where the exception_table_length and exception_table structures must be put.
output
)

Puts the JVMS exception_table corresponding to the Handler list that begins with the given element.

pack-priv static Handler

Returns:

the exception handler list with the start-end range removed.
removeRange
(final Handler
the beginning of a Handler list. May be null.
firstHandler
,
final Label
the start of the range to be removed.
start
,
final Label
the end of the range to be removed. Maybe null.
end
)

Removes the range between start and end from the Handler list that begins with the given element.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

catchTypeback to summary
pack-priv final int catchType

The 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.

catchTypeDescriptorback to summary
pack-priv final String catchTypeDescriptor

The internal name of the type of exceptions handled by this handler, or null to catch any exceptions.

endPcback to summary
pack-priv final Label endPc

The end_pc field of this JVMS exception_table entry. Corresponds to the end of the exception handler's scope (exclusive).

handlerPcback to summary
pack-priv final Label handlerPc

The handler_pc field of this JVMS exception_table entry. Corresponding to the beginning of the exception handler's code.

nextHandlerback to summary
pack-priv Handler nextHandler

The next exception handler.

startPcback to summary
pack-priv final Label startPc

The start_pc field of this JVMS exception_table entry. Corresponds to the beginning of the exception handler's scope (inclusive).

Constructor Detail

Handlerback to summary
pack-priv Handler(final Label startPc, final Label endPc, final Label handlerPc, final int catchType, final String catchTypeDescriptor)

Constructs a new Handler.

Parameters
startPc:Label

the start_pc field of this JVMS exception_table entry.

endPc:Label

the end_pc field of this JVMS exception_table entry.

handlerPc:Label

the handler_pc field of this JVMS exception_table entry.

catchType:int

The catch_type field of this JVMS exception_table entry.

catchTypeDescriptor:String

The internal name of the type of exceptions handled by this handler, or null to catch any exceptions.

Handlerback to summary
pack-priv Handler(final Handler handler, final Label startPc, final Label endPc)

Constructs a new Handler from the given one, with a different scope.

Parameters
handler:Handler

an existing Handler.

startPc:Label

the start_pc field of this JVMS exception_table entry.

endPc:Label

the end_pc field of this JVMS exception_table entry.

Method Detail

getExceptionTableLengthback to summary
pack-priv static int getExceptionTableLength(final Handler firstHandler)

Returns the number of elements of the Handler list that begins with the given element.

Parameters
firstHandler:Handler

the beginning of a Handler list. May be null.

Returns:int

the number of elements of the Handler list that begins with 'handler'.

getExceptionTableSizeback to summary
pack-priv static int getExceptionTableSize(final Handler firstHandler)

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.

Parameters
firstHandler:Handler

the beginning of a Handler list. May be null.

Returns:int

the size in bytes of the exception_table_length and exception_table structures.

putExceptionTableback to summary
pack-priv static void putExceptionTable(final Handler firstHandler, final ByteVector output)

Puts the JVMS exception_table corresponding to the Handler list that begins with the given element. This includes the exception_table_length field.

Parameters
firstHandler:Handler

the beginning of a Handler list. May be null.

output:ByteVector

where the exception_table_length and exception_table structures must be put.

removeRangeback to summary
pack-priv static Handler removeRange(final Handler firstHandler, final Label start, final Label end)

Removes the range between start and end from the Handler list that begins with the given element.

Parameters
firstHandler:Handler

the beginning of a Handler list. May be null.

start:Label

the start of the range to be removed.

end:Label

the end of the range to be removed. Maybe null.

Returns:Handler

the exception handler list with the start-end range removed.