private static ClassScanner createScannerForType(Class<?> type) {
    // scan fields then methods. cache result
    return ClassScanner
            .concat(ClassScanner.onlyFields(type),
                    ClassScanner.onlyMethods(type))
            .cache(); // cached version is thread-safe
  }
Caches reflection calls to speedup criteria creation.

<p>Internal API not to be used outside criteria package</p>

<p>Thread-safe implementation</p>
criteria/common/src/org/immutables/criteria/matcher/MemberLookupCache.java