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
484618
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;
  }
1160964
function(props) {
  const { object, defaultRep } = props;
  const rep = getRep(object, defaultRep, props.noGrip);
  return rep(props);
}
485252
static Map<String, Object> makeLoggingMap(Properties props)
  {
    Map<String, Object> loggingMap = Maps.newHashMap();

    loggingMap.put(
        "loggerClass", props.getProperty("com.metamx.emitter.logging.class", LoggingEmitter.class.getName())
    );
    loggingMap.put(
        "logLevel", props.getProperty("com.metamx.emitter.logging.level", "debug")
    );
    return loggingMap;
  }
458946
public Collection<String> getPropertyNames() throws RepositoryException
   {
      // List <String> propnames = new ArrayList<String>();
      PropertyIterator iter = node.getProperties();
      ArrayList<String> props = new ArrayList<String>();
      while (iter.hasNext())
      {
         String name = iter.nextProperty().getName();
         if (!"jcr:primaryType".equals(name) && !"jcr:mixinTypes".equals(name))
            props.add(name);
      }
      props.addAll(content.getPropertyNames());
      return props;
   }
1073467
protected Map<PropertyKey, Object> properties() {

        if (properties == null) {
            properties = new EnumMap<>(PropertyKey.class);
        }

        return properties;
    }
855294
@VisibleForTesting
	protected <K, V> KafkaProducer<K, V> getKafkaProducer(Properties props) {
		return new KafkaProducer<>(props);
	}
1253063
private static <T extends ObjectMapper> T initializeObjectMapper(T mapper) {
        mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
                .configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, true)
                .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
                .configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true)
                .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
                .configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true)
                .setSerializationInclusion(JsonInclude.Include.NON_NULL)
                .registerModule(new JavaTimeModule())
                .registerModule(ByteArraySerializer.getModule())
                .registerModule(Base64UrlSerializer.getModule())
                .registerModule(DateTimeSerializer.getModule())
                .registerModule(DateTimeRfc1123Serializer.getModule())
                .registerModule(DurationSerializer.getModule());
        mapper.setVisibility(mapper.getSerializationConfig().getDefaultVisibilityChecker()
                .withFieldVisibility(JsonAutoDetect.Visibility.ANY)
                .withSetterVisibility(JsonAutoDetect.Visibility.NONE)
                .withGetterVisibility(JsonAutoDetect.Visibility.NONE)
                .withIsGetterVisibility(JsonAutoDetect.Visibility.NONE));
        return mapper;
    }
22692
public JcProperty property(String name) {
		JcProperty ret = new JcProperty(name, this, OPERATOR.PropertyContainer.PROPERTY_ACCESS);
		QueryRecorder.recordInvocationConditional(this, "property", ret, QueryRecorder.literal(name));
		return ret;
	}
1202370
public Map<Object, Object> getDefaultProperties(ResolverWrapper resolver) {
		// if no resolver is given or the list of default properties is empty then 
		// return an empty map
		if(resolver == null || resolver.properties() == null || resolver.properties().length == 0) {
			return Collections.emptyMap();
		}
		
		// get properties from the resolver annotation
		DefaultProperty[] properties = resolver.properties();
		
		// copy each property annotation into the map for later use
		Map<Object, Object> propertyMap = new HashMap<>(properties.length);
		for(DefaultProperty property : properties) {
			// nulls and empty keys are bad
			if(property.key() == null || property.key().isEmpty() || property.value() == null) {
				continue;
			}
			// no dupes
			if(propertyMap.containsKey(property.key())) {
				continue;
			}
			// put in map
			propertyMap.put(property.key(), property.value());
		}		
		return propertyMap;
	}
217256
public static Class<? extends RowMapper> setDefaultXmlRowMapping(Class mapToClass, Class<? extends RowMapper> rowMapperClass) {
        Class<? extends RowMapper> ret = DEFAULT_XMLOBJ_ROWMAPPING;
        DEFAULT_XMLOBJ_ROWMAPPING = rowMapperClass;
        XMLOBJ_CLASS = mapToClass;
        return ret;
    }
735339
public void createRelationFieldMap(Props props)
   {
      byte[] fieldMapData = null;
      for (Integer key : RELATION_KEYS)
      {
         fieldMapData = props.getByteArray(key);
         if (fieldMapData != null)
         {
            break;
         }
      }

      if (fieldMapData == null)
      {
         populateDefaultData(getDefaultRelationData());
      }
      else
      {
         createFieldMap(fieldMapData);
      }
   }
78882
@SuppressWarnings("unchecked")
    public <T> T getProperty(String propName, T defaultValue) {
        String propValue = props.getProperty(propName);
        if (propValue == null)
            return defaultValue;
        return ReflectionUtil.<T>getObjectInstance(propValue);
    }
361378
public static final DefaultTupleMapper newObjectDefaultTupleMapper( ) {
        final ObjectMapper mapper = new ObjectMapper();
        return new DefaultTupleMapper(new TupleMapper<String>() {
            @Override
            public String map(Tuple input) {
                try {
                    return mapper.writeValueAsString(input.getValueByField(FIELD_SOURCE));
                } catch (JsonProcessingException e) {
                    throw new MappingException("Error happen while processing json on object", e);
                }
            }
        });
    }
337504
public static Properties getProps(Properties props, String name, Properties defaultProperties) {
        final String propString = props.getProperty(name);
        if (propString == null) return defaultProperties;
        String[] propValues = propString.split(",");
        if (propValues.length < 1) {
            throw new IllegalArgumentException("Illegal format of specifying properties '" + propString + "'");
        }
        Properties properties = new Properties();
        for (int i = 0; i < propValues.length; i++) {
            String[] prop = propValues[i].split("=");
            if (prop.length != 2) throw new IllegalArgumentException("Illegal format of specifying properties '" + propValues[i] + "'");
            properties.put(prop[0], prop[1]);
        }
        return properties;
    }
1325064
public String getConfigAttribute(Map<String, Object> props, String key) {
        return getConfigAttributeWithDefaultValue(props, key, null);
    }
283318
public static String findManifestProperty( Properties props, String propertyName ) {

		String result = null;
		for( Map.Entry<Object,Object> entry : props.entrySet()) {
			if( propertyName.equalsIgnoreCase( String.valueOf( entry.getKey()))) {
				result = String.valueOf( entry.getValue());
				break;
			}
		}

		return result;
	}
1289289
public static CsvMapper defaultMapper() {
		final CsvMapper mapper = new CsvMapper();
		mapper.enable(CsvParser.Feature.TRIM_SPACES);
		mapper.enable(CsvParser.Feature.WRAP_AS_ARRAY);
		mapper.configure(JsonParser.Feature.ALLOW_YAML_COMMENTS, true);
		return mapper;
	}