private static ObjectNameMapper getObjectNameMapper(Properties props) {
    ObjectNameMapper mapper = ObjectNameMapper.DEFAULT;
    final String jmxNameMapperClass = props.getProperty(REGISTRY_JMX_NAME_PROP);
    if (jmxNameMapperClass != null) {
      try {
        Class<?> mapperClazz = Class.forName(jmxNameMapperClass);
        mapper = (ObjectNameMapper) mapperClazz.newInstance();
      } catch (Throwable t) {
        LOG.error(
            "failed to create the JMX ObjectNameMapper instance of class "
                + jmxNameMapperClass
                + ", using the default naming scheme",
            t);
      }
    }

    return mapper;
  }
private static ObjectNameMapper getObjectNameMapper ( Properties props ) { ObjectNameMapper mapper = ObjectNameMapper . DEFAULT ; final String jmxNameMapperClass = props . getProperty ( REGISTRY_JMX_NAME_PROP ) ; if ( jmxNameMapperClass != null ) { try { Class < ? > mapperClazz = Class . forName ( jmxNameMapperClass ) ; mapper = ( ObjectNameMapper ) mapperClazz . newInstance ( ) ; } catch ( Throwable t ) { LOG . error ( "failed to create the JMX ObjectNameMapper instance of class " + jmxNameMapperClass + ", using the default naming scheme" , t ) ; } } return mapper ; }
Gets the {@link ObjectNameMapper} to use by looking at the
{@code com.netflix.servo.DefaultMonitorRegistry.jmxMapperClass}
property. If not specified, then {@link ObjectNameMapper#DEFAULT}
is used.

@param props the properties
@return the mapper to use