Class AbstractClassTestingTypeFilter
- java.lang.Object
- org.springframework.core.type.filter.AbstractClassTestingTypeFilter
- All Implemented Interfaces:
TypeFilter
- Direct Known Subclasses:
RegexPatternTypeFilter
public abstract class AbstractClassTestingTypeFilter extends Object implements TypeFilter
Type filter that exposes aClassMetadata
object to subclasses, for class testing purposes.- Since:
- 2.5
- Author:
- Rod Johnson, Costin Leau, Juergen Hoeller
- See Also:
match(org.springframework.core.type.ClassMetadata)
Constructor Summary
Constructors Constructor Description AbstractClassTestingTypeFilter()
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
match(ClassMetadata metadata)
Determine a match based on the given ClassMetadata object.boolean
match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory)
Determine whether this filter matches for the class described by the given metadata.
Constructor Detail
AbstractClassTestingTypeFilter
public AbstractClassTestingTypeFilter()
Method Detail
match
public final boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException
Description copied from interface:TypeFilter
Determine whether this filter matches for the class described by the given metadata.- Specified by:
match
in interfaceTypeFilter
- Parameters:
metadataReader
- the metadata reader for the target classmetadataReaderFactory
- a factory for obtaining metadata readers for other classes (such as superclasses and interfaces)- Returns:
- whether this filter matches
- Throws:
IOException
- in case of I/O failure when reading metadata
match
protected abstract boolean match(ClassMetadata metadata)
Determine a match based on the given ClassMetadata object.- Parameters:
metadata
- the ClassMetadata object- Returns:
- whether this filter matches on the specified type