test_class.file: oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/PropertiesUtilTest.java
test_class.identifier: PropertiesUtilTest
test_case.body: @Test
      public void testToObject() {
          assertEquals("hallo", PropertiesUtil.toObject("hallo"));
          assertEquals("1", PropertiesUtil.toObject(new String[]{"1", "2"}));
          assertEquals(null, PropertiesUtil.toObject(null));
          assertEquals(null, PropertiesUtil.toObject(new String[]{}));
          final List<String> l = new ArrayList<String>();
          assertEquals(null, PropertiesUtil.toObject(l));
          l.add("1");
          assertEquals("1", PropertiesUtil.toObject(l));
          l.add("2");
          assertEquals("1", PropertiesUtil.toObject(l));
          final Map<String, Object> m = new HashMap<String, Object>();
          assertEquals(m, PropertiesUtil.toObject(m));
      }
test_case.class_method_signature: PropertiesUtilTest.testToObject()
test_case.full_signature: @Test public void testToObject()
test_case.identifier: testToObject
test_case.invocations: assertEquals toObject assertEquals toObject assertEquals toObject assertEquals toObject assertEquals toObject add assertEquals toObject add assertEquals toObject assertEquals toObject
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToObject()
focal_class.declarator: log = LoggerFactory.getLogger(PropertiesUtil.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger log = LoggerFactory.getLogger(PropertiesUtil.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/PropertiesUtil.java
focal_class.identifier: PropertiesUtil
focal_class.class_method_signature: PropertiesUtil.PropertiesUtil()
focal_class.full_signature: private  PropertiesUtil()
focal_class.identifier: PropertiesUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  PropertiesUtil()
focal_class.class_method_signature: PropertiesUtil.toBoolean(Object propValue, boolean defaultValue)
focal_class.full_signature: public static boolean toBoolean(Object propValue, boolean defaultValue)
focal_class.identifier: toBoolean
focal_class.modifiers: public static
focal_class.parameters: (Object propValue, boolean defaultValue)
focal_class.return: boolean
focal_class.signature: boolean toBoolean(Object propValue, boolean defaultValue)
focal_class.class_method_signature: PropertiesUtil.toString(Object propValue, String defaultValue)
focal_class.full_signature: public static String toString(Object propValue, String defaultValue)
focal_class.identifier: toString
focal_class.modifiers: public static
focal_class.parameters: (Object propValue, String defaultValue)
focal_class.return: String
focal_class.signature: String toString(Object propValue, String defaultValue)
focal_class.class_method_signature: PropertiesUtil.toLong(Object propValue, long defaultValue)
focal_class.full_signature: public static long toLong(Object propValue, long defaultValue)
focal_class.identifier: toLong
focal_class.modifiers: public static
focal_class.parameters: (Object propValue, long defaultValue)
focal_class.return: long
focal_class.signature: long toLong(Object propValue, long defaultValue)
focal_class.class_method_signature: PropertiesUtil.toInteger(Object propValue, int defaultValue)
focal_class.full_signature: public static int toInteger(Object propValue, int defaultValue)
focal_class.identifier: toInteger
focal_class.modifiers: public static
focal_class.parameters: (Object propValue, int defaultValue)
focal_class.return: int
focal_class.signature: int toInteger(Object propValue, int defaultValue)
focal_class.class_method_signature: PropertiesUtil.toDouble(Object propValue, double defaultValue)
focal_class.full_signature: public static double toDouble(Object propValue, double defaultValue)
focal_class.identifier: toDouble
focal_class.modifiers: public static
focal_class.parameters: (Object propValue, double defaultValue)
focal_class.return: double
focal_class.signature: double toDouble(Object propValue, double defaultValue)
focal_class.class_method_signature: PropertiesUtil.toObject(Object propValue)
focal_class.full_signature: public static Object toObject(Object propValue)
focal_class.identifier: toObject
focal_class.modifiers: public static
focal_class.parameters: (Object propValue)
focal_class.return: Object
focal_class.signature: Object toObject(Object propValue)
focal_class.class_method_signature: PropertiesUtil.toStringArray(Object propValue)
focal_class.full_signature: public static String[] toStringArray(Object propValue)
focal_class.identifier: toStringArray
focal_class.modifiers: public static
focal_class.parameters: (Object propValue)
focal_class.return: String[]
focal_class.signature: String[] toStringArray(Object propValue)
focal_class.class_method_signature: PropertiesUtil.toStringArray(Object propValue, String[] defaultArray)
focal_class.full_signature: public static String[] toStringArray(Object propValue, String[] defaultArray)
focal_class.identifier: toStringArray
focal_class.modifiers: public static
focal_class.parameters: (Object propValue, String[] defaultArray)
focal_class.return: String[]
focal_class.signature: String[] toStringArray(Object propValue, String[] defaultArray)
focal_class.class_method_signature: PropertiesUtil.populate(Object instance, Map<String,?> config, boolean validate)
focal_class.full_signature: @SuppressWarnings("unchecked") public static void populate(Object instance, Map<String,?> config, boolean validate)
focal_class.identifier: populate
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (Object instance, Map<String,?> config, boolean validate)
focal_class.return: void
focal_class.signature: void populate(Object instance, Map<String,?> config, boolean validate)
focal_class.class_method_signature: PropertiesUtil.getSetters(Class<?> klass)
focal_class.full_signature: private static Map<String, Method> getSetters(Class<?> klass)
focal_class.identifier: getSetters
focal_class.modifiers: private static
focal_class.parameters: (Class<?> klass)
focal_class.return: Map<String, Method>
focal_class.signature: Map<String, Method> getSetters(Class<?> klass)
focal_class.class_method_signature: PropertiesUtil.setProperty(
              Object instance, String name, Method setter, Object value)
focal_class.full_signature: private static void setProperty(
              Object instance, String name, Method setter, Object value)
focal_class.identifier: setProperty
focal_class.modifiers: private static
focal_class.parameters: (
              Object instance, String name, Method setter, Object value)
focal_class.return: void
focal_class.signature: void setProperty(
              Object instance, String name, Method setter, Object value)
focal_method.body: public static Object toObject(Object propValue) {
          if (propValue == null) {
              return null;
          } else if (propValue.getClass().isArray()) {
              Object[] prop = (Object[]) propValue;
              return prop.length > 0 ? prop[0] : null;
          } else if (propValue instanceof Collection<?>) {
              Collection<?> prop = (Collection<?>) propValue;
              return prop.isEmpty() ? null : prop.iterator().next();
          } else {
              return propValue;
          }
      }
focal_method.class_method_signature: PropertiesUtil.toObject(Object propValue)
focal_method.full_signature: public static Object toObject(Object propValue)
focal_method.identifier: toObject
focal_method.invocations: isArray getClass isEmpty next iterator
focal_method.modifiers: public static
focal_method.parameters: (Object propValue)
focal_method.return: Object
focal_method.signature: Object toObject(Object propValue)