public class TypePatternClassFilter extends Object implements ClassFilter
ClassFilter implementation using AspectJ type matching.TRUE| 构造器和说明 |
|---|
TypePatternClassFilter()
Creates a new instance of the
TypePatternClassFilter class. |
TypePatternClassFilter(String typePattern)
Create a fully configured
TypePatternClassFilter using the
given type pattern. |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getTypePattern()
Return the AspectJ type pattern to match.
|
boolean |
matches(Class<?> clazz)
Should the pointcut apply to the given interface or target class?
|
void |
setTypePattern(String typePattern)
Set the AspectJ type pattern to match.
|
public TypePatternClassFilter()
TypePatternClassFilter class.
This is the JavaBean constructor; be sure to set the
typePattern property, else a
no doubt fatal IllegalStateException will be thrown
when the matches(Class) method is first invoked.
public TypePatternClassFilter(String typePattern)
TypePatternClassFilter using the
given type pattern.typePattern - the type pattern that AspectJ weaver should parsepublic void setTypePattern(String typePattern)
Examples include:
org.springframework.beans.*
This will match any class or interface in the given package.
org.springframework.beans.ITestBean+
This will match the ITestBean interface and any class
that implements it.
These conventions are established by AspectJ, not Spring AOP.
typePattern - the type pattern that AspectJ weaver should parsepublic String getTypePattern()
public boolean matches(Class<?> clazz)
matches 在接口中 ClassFilterclazz - candidate target classIllegalStateException - if no setTypePattern(String) has been set