インタフェースjava.lang.classfile.CodeBuilder.BlockCodeBuilderの
使用
-
java.lang.classfilePREVIEWでのCodeBuilder.BlockCodeBuilderPREVIEWの使用
修飾子と型メソッド説明default CodeBuilderPREVIEW
CodeBuilder.block
(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> handler) 作成するメソッドに字句ブロックを追加します。CodeBuilder.CatchBuilder.catching
(ClassDesc exceptionType, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> catchHandler) 指定された型の例外を捕捉するcatchブロックを追加します。void
CodeBuilder.CatchBuilder.catchingAll
(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> catchAllHandler) すべての例外を捕捉する"catch"ブロックを追加します。CodeBuilder.CatchBuilder.catchingMulti
(List<ClassDesc> exceptionTypes, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> catchHandler) 指定された型の例外を捕捉するcatchブロックを追加します。default CodeBuilderPREVIEW
指定されたopcodeに従って、オペランド・スタックの上部にある値に条件付き"if-then"ブロックを追加します。default CodeBuilderPREVIEW
CodeBuilder.ifThen
(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> thenHandler) オペランド・スタック上部のブール値に条件付きである"if-then"ブロックを追加します。default CodeBuilderPREVIEW
CodeBuilder.ifThenElse
(OpcodePREVIEW opcode, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> thenHandler, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> elseHandler) 指定されたopcodeに従って、オペランド・スタックの上部にある値に条件付き"if-then-else"ブロックを追加します。default CodeBuilderPREVIEW
CodeBuilder.ifThenElse
(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> thenHandler, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> elseHandler) オペランド・スタック上部のブール値に条件付きである"if-then-else"ブロックを追加します。default CodeBuilderPREVIEW
CodeBuilder.trying
(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> tryHandler, Consumer<CodeBuilder.CatchBuilderPREVIEW> catchesHandler) 1つのtryブロックと0個以上のcatchブロックで構成される"try-catch"ブロックを追加します。