How can I determine if a local variable is "final" from Java bytecode? (Associated with BCEL)

Where is the information, for example, if the local variable is "final" stored in Java bytecode? I know that for fields (global variables) and methods they are found in the bits of the access flag, but cannot find the equivalent in the local variable table.

I am interested in this question because I use BCEL to check if a local variable is final, and found the equivalent for fields, methods, and classes in the AccessFlags class.

Thanks in advance.

+5
source share
3 answers

-. , , -.

JVM .

+2

- . 'final' , . . 4.7.13 JVM.

+1

, final ity ; , final -.

0

Source: https://habr.com/ru/post/1695712/


All Articles