Package org.ehcache.sizeof.filters
Class TypeFilter
- java.lang.Object
-
- org.ehcache.sizeof.filters.TypeFilter
-
- All Implemented Interfaces:
SizeOfFilter
public class TypeFilter extends java.lang.Object implements SizeOfFilter
-
-
Field Summary
Fields Modifier and Type Field Description private WeakIdentityConcurrentMap<java.lang.Class<?>,java.lang.Object>classesIgnoredprivate WeakIdentityConcurrentMap<java.lang.Class<?>,java.util.concurrent.ConcurrentMap<java.lang.reflect.Field,java.lang.Object>>fieldsIgnoredprivate WeakIdentityConcurrentMap<java.lang.Class<?>,java.lang.Object>superClasses
-
Constructor Summary
Constructors Constructor Description TypeFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddClass(java.lang.Class<?> classToFilterOut, boolean strict)voidaddField(java.lang.reflect.Field fieldToFilterOut)booleanfilterClass(java.lang.Class<?> klazz)Checks whether the type needs to be filteredjava.util.Collection<java.lang.reflect.Field>filterFields(java.lang.Class<?> klazz, java.util.Collection<java.lang.reflect.Field> fields)Returns the fields to walk and measure for a type
-
-
-
Field Detail
-
classesIgnored
private final WeakIdentityConcurrentMap<java.lang.Class<?>,java.lang.Object> classesIgnored
-
superClasses
private final WeakIdentityConcurrentMap<java.lang.Class<?>,java.lang.Object> superClasses
-
fieldsIgnored
private final WeakIdentityConcurrentMap<java.lang.Class<?>,java.util.concurrent.ConcurrentMap<java.lang.reflect.Field,java.lang.Object>> fieldsIgnored
-
-
Method Detail
-
filterFields
public java.util.Collection<java.lang.reflect.Field> filterFields(java.lang.Class<?> klazz, java.util.Collection<java.lang.reflect.Field> fields)Description copied from interface:SizeOfFilterReturns the fields to walk and measure for a type- Specified by:
filterFieldsin interfaceSizeOfFilter- Parameters:
klazz- the typefields- the fields already "qualified"- Returns:
- the filtered Set
-
filterClass
public boolean filterClass(java.lang.Class<?> klazz)
Description copied from interface:SizeOfFilterChecks whether the type needs to be filtered- Specified by:
filterClassin interfaceSizeOfFilter- Parameters:
klazz- the type- Returns:
- true, if to be filtered out
-
addClass
public void addClass(java.lang.Class<?> classToFilterOut, boolean strict)
-
addField
public void addField(java.lang.reflect.Field fieldToFilterOut)
-
-