src/main/java/org/ehcache/sizeof/ObjectGraphWalker.java
private Collection<Field> getFilteredFields(Class<?> refClass) {
        SoftReference<Collection<Field>> ref = fieldCache.get(refClass);
        Collection<Field> fieldList = ref != null ? ref.get() : null;
        if (fieldList != null) {
            return fieldList;
        } else {
            Collection<Field> result;
            result = sizeOfFilter.filterFields(refClass, getAllFields(refClass));
            if (USE_VERBOSE_DEBUG_LOGGING && LOG.isDebugEnabled()) {
                for (Field field : result) {
                    if (Modifier.isTransient(field.getModifiers())) {
                        LOG.debug("SizeOf engine walking transient field '{}' of class {}", field.getName(), refClass.getName());
                    }
                }
            }
            fieldCache.put(refClass, new SoftReference<>(result));
            return result;
        }
    }
private Collection<Field> getFilteredFields(Class<?> refClass) {
        SoftReference<Collection<Field>> ref = fieldCache.get(refClass);
        Collection<Field> fieldList = ref != null ? ref.get() : null;
        if (fieldList != null) {
            return fieldList;
        } else {
            Collection<Field> result;
            result = sizeOfFilter.filterFields(refClass, getAllFields(refClass));
            if (USE_VERBOSE_DEBUG_LOGGING && LOG.isDebugEnabled()) {
                for (Field field : result) {
                    if (Modifier.isTransient(field.getModifiers())) {
                        LOG.debug("SizeOf engine walking transient field '{}' of class {}", field.getName(), refClass.getName());
                    }
                }
            }
            fieldCache.put(refClass, new SoftReference<>(result));
            return result;
        }
    }
private Collection < Field > getFilteredFields ( Class < ? > refClass ) { SoftReference < Collection < Field >> ref = fieldCache . get ( refClass ) ; Collection < Field > fieldList = ref != null ? ref . get ( ) : null ; if ( fieldList != null ) { return fieldList ; } else { Collection < Field > result ; result = sizeOfFilter . filterFields ( refClass , getAllFields ( refClass ) ) ; if ( USE_VERBOSE_DEBUG_LOGGING && LOG . isDebugEnabled ( ) ) { for ( Field field : result ) { if ( Modifier . isTransient ( field . getModifiers ( ) ) ) { LOG . debug ( "SizeOf engine walking transient field '{}' of class {}" , field . getName ( ) , refClass . getName ( ) ) ; } } } fieldCache . put ( refClass , new SoftReference <> ( result ) ) ; return result ; } }
Returns the filtered fields for a particular type

@param refClass the type
@return A collection of fields to be visited
Returns the filtered fields for a particular type