static String buildMessage ( BeanResolutionContext resolutionContext , Argument argument , String message , boolean circular ) { StringBuilder builder = new StringBuilder ( "Failed to inject value for parameter [" ) ; String ls = System . getProperty ( "line.separator" ) ; BeanResolutionContext . Path path = resolutionContext . getPath ( ) ; builder . append ( argument . getName ( ) ) . append ( "] of class: " ) . append ( path . peek ( ) . getDeclaringType ( ) . getName ( ) ) . append ( ls ) . append ( ls ) ; if ( message != null ) { builder . append ( "Message: " ) . append ( message ) . append ( ls ) ; } appendPath ( circular , builder , ls , path ) ; return builder . toString ( ) ; }
Builds an appropriate error message for a constructor argument .