public Object parseIdRefElement ( Element ele ) { // A generic reference to any name of any bean. String refName = ele . getAttribute ( BEAN_REF_ATTRIBUTE ) ; if ( ! StringUtils . hasLength ( refName ) ) { // A reference to the id of another bean in the same XML file. refName = ele . getAttribute ( LOCAL_REF_ATTRIBUTE ) ; if ( ! StringUtils . hasLength ( refName ) ) { error ( "Either 'bean' or 'local' is required for <idref> element" , ele ) ; return null ; } } if ( ! StringUtils . hasText ( refName ) ) { error ( "<idref> element contains empty target attribute" , ele ) ; return null ; } RuntimeBeanNameReference ref = new RuntimeBeanNameReference ( refName ) ; ref . setSource ( extractSource ( ele ) ) ; return ref ; }
Return a typed String value Object for the given idref element .