Java tutorial
//package com.java2s; import java.util.HashMap; public class Main { private static HashMap<Long, Class<?>> unoFallbacks = new HashMap<Long, Class<?>>(); private static HashMap<Class<?>, Long> unoFallbacksClassToPtr = new HashMap<Class<?>, Long>(); public static void RegisterUnoFallback(String javaTypeName, long unoTypePtr) { Class<?> cls = null; try { cls = Class.forName(javaTypeName); } catch (ClassNotFoundException ignore) { } unoFallbacks.put(Long.valueOf(unoTypePtr), cls); unoFallbacksClassToPtr.put(cls, Long.valueOf(unoTypePtr)); } }