Object (final Class aClass) { Object result = null; synchronized (ourCache) { result = ourCache.get(aClass); } if (result == null) { result = ourNullObject; Class<?> helperClass = null; try { final ClassLoader loader = aClass.getClassLoader(); helperClass = loader != null? loader.loadClass(IntrospectionHelper.class.getName()) : IntrospectionHelper.class; final Method getHelperMethod = helperClass.getMethod("getHelper", Class.class); result = getHelperMethod.invoke(null, aClass); } catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException e) { LOG.info(e); } catch (InvocationTargetException ignored) { } synchronized (ourCache) { if (helperClass != null) { clearAntStaticCache(helperClass); } ourCache.put(aClass, result); } } scheduleCacheCleaning(); return result == ourNullObject? null : result; }