Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C-namespace section in spring reference document

Tags:

java

spring

I am reading spring document and I couldn't understand below statement from c-namespace section in the reference document

For the rare cases where the constructor argument names are not available (usually if the bytecode was compiled without debugging information), one can use fallback to the argument indexes

My questions are :

  1. In what cases constructor argument is not available.
  2. What does it mean that -byte code compiled without debugging information. Can be it checked using eclipse ?

I was checking for this over web, but could get any reference. I found Constructor injection using c:namespace but it didn't explain any thing

like image 737
Anveshan Avatar asked Dec 11 '25 18:12

Anveshan


1 Answers

Constructor argument names are only available if the class is compiled with variable debugging information. When using javac, this is the -g:vars option. In Eclipse, this is Windows > Preferences > Java > Compiler > Add variable attributes to generated class files.

like image 80
Brett Kail Avatar answered Dec 13 '25 08:12

Brett Kail



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!