C-namespace section in spring reference document
I am reading the spring doc and I could not understand below from the c-namespace section in the reference doc
In rare cases where constructor argument names are not available (usually if bytecode was compiled without debug information), you can use rollback for argument indices
My questions:
- When a constructor argument is not available.
- Which means the -byte code is compiled without debugging information. Can this be verified with eclipse?
I tested this over the internet but could get any link. I found an installation of a constructor using the c: namespace , but didn't explain anything
source to share
If the class in question was compiled javac
without a flag -g
("debug info" - see javac docs ), then the compiled class bytecode will not contain the names of the constructor parameters. This means that Spring cannot use reflection according to the names of the constructor parameters, so you need to type them by position (i.e. by index).
It is a build environment that generates compiled bytecode to deliver debug information. Once the code is compiled, there is nothing you can do to extract this information without recompiling it.
source to share