站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

AnnotationTypeFilter (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.core.typefilter
Class AnnotationTypeFilter

java.lang.Object
  extended by org.springframework.core.typefilter.AbstractTypeHierarchyTraversingFilter
      extended by org.springframework.core.typefilter.AnnotationTypeFilter
All Implemented Interfaces:
TypeFilter

public class AnnotationTypeFilter
extends AbstractTypeHierarchyTraversingFilter

Matches classes with a given annotation optionally including inherited annotations. The matching logic mirrors that of Class.isAnnotationPresent() with an additional option to explicitely control if any inherited annotatins should be considered.

Since:
2.1
Author:
Mark Fisher, Ramnivas Laddad

Field Summary
 
Fields inherited from interface org.springframework.core.typefilter.TypeFilter
TRUE
 
Constructor Summary
AnnotationTypeFilter(Class<? extends Annotation> annotationClass)
           
AnnotationTypeFilter(Class<? extends Annotation> annotationClass, boolean considerInherited)
           
 
Method Summary
protected  boolean matchSelf(org.objectweb.asm.ClassReader classReader)
          Override this to match self characterisitcs alone.
 
Methods inherited from class org.springframework.core.typefilter.AbstractTypeHierarchyTraversingFilter
match, matchClassName, matchInterfaceName, matchSuperClassName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationTypeFilter

public AnnotationTypeFilter(Class<? extends Annotation> annotationClass,
                            boolean considerInherited)
Parameters:
annotationClass - The annotation to match
considerInherited - search inheritance hierarchy for the annotation

AnnotationTypeFilter

public AnnotationTypeFilter(Class<? extends Annotation> annotationClass)
Parameters:
annotationClass - The annotation to match
Method Detail

matchSelf

protected boolean matchSelf(org.objectweb.asm.ClassReader classReader)
Description copied from class: AbstractTypeHierarchyTraversingFilter
Override this to match self characterisitcs alone. Typically, the implementation will use a visitor to extract information to perform matching.

Overrides:
matchSelf in class AbstractTypeHierarchyTraversingFilter

The Spring Framework

Copyright © 2002-2007 The Spring Framework.