Various technical articles, IT-related tutorials, software information, and development journals
Thursday, June 13, 2019
Inner class modifiers are in two places
Today I used Apache BCEL to remove the final modifier from some Java classes, including some inner classes. I successfully altered the modifiers on the ClassGens, but when I loaded the classes I found that the inner ones were still final. Then I remembered that the InnerClass records (in the InnerClasses attribute) have an "inner access flags" property. Once I checked for and removed the final modifier from those, the loaded inner classes were non-final.
Labels:
java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment