public Class<?> findOrInsert(ClassLoader classLoader, T key, Callable<Class<?>> lazy, Object monitor) {
        Class<?> type = find(classLoader, key);
        if (type != null) {
            return type;
        } else {
            synchronized (monitor) {
                return findOrInsert(classLoader, key, lazy);
            }
        }
    }
public Class < ? > findOrInsert ( ClassLoader classLoader , T key , Callable < Class < ? > > lazy , Object monitor ) { Class < ? > type = find ( classLoader , key ) ; if ( type != null ) { return type ; } else { synchronized ( monitor ) { return findOrInsert ( classLoader , key , lazy ) ; } } }
Finds an existing type or inserts a new one if the previous type was not found.

@param classLoader The class loader for which this type is stored.
@param key         The key for the type in question.
@param lazy        A lazy creator for the type to insert of no previous type was stored in the cache.
@param monitor     A monitor to lock before creating the lazy type.
@return The lazily created type or a previously submitted type for the same class loader and key combination.