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>
classesIgnored
private WeakIdentityConcurrentMap<java.lang.Class<?>,java.util.concurrent.ConcurrentMap<java.lang.reflect.Field,java.lang.Object>>
fieldsIgnored
private 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 void
addClass(java.lang.Class<?> classToFilterOut, boolean strict)
void
addField(java.lang.reflect.Field fieldToFilterOut)
boolean
filterClass(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:SizeOfFilter
Returns the fields to walk and measure for a type- Specified by:
filterFields
in 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:SizeOfFilter
Checks whether the type needs to be filtered- Specified by:
filterClass
in 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)
-
-