public static ResourceDescriptionResolver getResourceDescriptionResolver ( final String ... keyPrefix ) { StringBuilder prefix = new StringBuilder ( SUBSYSTEM_NAME ) ; for ( String kp : keyPrefix ) { prefix . append ( ' ' ) . append ( kp ) ; } return new StandardResourceDescriptionResolver ( prefix . toString ( ) , RESOURCE_NAME , LoggingExtension . class . getClassLoader ( ) , true , false ) { @ Override public String getOperationParameterDescription ( final String operationName , final String paramName , final Locale locale , final ResourceBundle bundle ) { if ( DELEGATE_DESC_OPTS . contains ( operationName ) ) { return getResourceAttributeDescription ( paramName , locale , bundle ) ; } return super . getOperationParameterDescription ( operationName , paramName , locale , bundle ) ; } @ Override public String getOperationParameterValueTypeDescription ( final String operationName , final String paramName , final Locale locale , final ResourceBundle bundle , final String ... suffixes ) { if ( DELEGATE_DESC_OPTS . contains ( operationName ) ) { return getResourceAttributeDescription ( paramName , locale , bundle ) ; } return super . getOperationParameterValueTypeDescription ( operationName , paramName , locale , bundle , suffixes ) ; } @ Override public String getOperationParameterDeprecatedDescription ( final String operationName , final String paramName , final Locale locale , final ResourceBundle bundle ) { if ( DELEGATE_DESC_OPTS . contains ( operationName ) ) { return getResourceAttributeDeprecatedDescription ( paramName , locale , bundle ) ; } return super . getOperationParameterDeprecatedDescription ( operationName , paramName , locale , bundle ) ; } } ; }
Returns a resource description resolver that uses common descriptions for some attributes .