在Spring中用到cglib來enhance 類代碼,猜測 Bean的Get Set函數可能作過特殊處理,在Spring的源碼中有好幾個地方有這樣的代碼:函數
method.getName().startsWith("set") spa
method.getName().startsWith("get"))get
猜測是加強了這樣的方法,源碼
好比Spring中的AUTOWIRE_BY_NAME有多是經過名字一致,而後從BeanFactory或ApplicationContext中獲取到名字同樣的Bean,而後作屬性設置。it
這個只是猜測,有時間了再回來翻代碼驗證下。io