예제 #1
0
 private static void dumpObject(String prefix, Object obj) {
   if (obj instanceof Long) {
     Long l = (Long) obj;
     log.info(prefix + "0x" + Long.toHexString(l));
   } else if (obj instanceof Map) dumpMap(prefix, (Map) obj);
   else if (obj.getClass().isArray()) dumpArray(prefix, (Object[]) obj);
   else log.info(prefix + obj);
 }
예제 #2
0
 /*
     public final List getUsagePairs() {
         List usage_pairs_list = new ArrayList();
         Object[] usage_pairs = (Object[])properties.get(kIOHIDDeviceUsagePairsKey);
         if (usage_pairs == null) {
             int usage_page_id = getIntFromProperties(properties, kIOHIDPrimaryUsagePageKey);
             int usage_id = getIntFromProperties(properties, kIOHIDPrimaryUsageKey);
             UsagePair pair = createUsagePair(usage_page_id, usage_id);
             if (pair != null)
                 usage_pairs_list.add(pair);
         }
         for (int i = 0; i < usage_pairs.length; i++) {
             Map usage_pair = (Map)usage_pairs[i];
             int usage_page_id = getIntFromProperties(usage_pair, kIOHIDDeviceUsagePageKey);
             int usage_id = getIntFromProperties(usage_pair, kIOHIDDeviceUsageKey);
             UsagePair pair = createUsagePair(usage_page_id, usage_id);
             if (pair != null)
                 usage_pairs_list.add(pair);
         }
         return usage_pairs_list;
     }
 */
 private void dumpProperties() {
   log.info(toString());
   dumpMap("", properties);
 }