Question

1.Could I add the comments to my existing java class with the BCEL? 2.Could I add the comments to my newly manually generated java class with the BCEL?

Was it helpful?

Solution

BCEL manipulates byte code. Byte code doesn't contain any comments.

OTHER TIPS

Comments from the Java source code aren't stored in compiled class files (ie bytecode). However you can use annotatons on class, field or method level to store some comments to bytecode. You can also use a custom bytecode attribute to store comments or any other custom information inside bytecode.

Comments are stripped out and ignored by the compiler and not placed in the resulting bytecode (this is probably true for every compiled language). There is no way to put Java comments in bytecode. BCEL won't help you here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top