Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AopUtils.CanApply(IPointcut, Type, Type) Method

Can the supplied pointcut apply at all on the supplied targetType?

[Visual Basic]
Public Overloads Shared Sub CanApply( _
   ByVal pointcut As IPointcut, _
   ByVal targetType As Type, _
   ByVal proxyInterfaces As Type _
public static bool CanApply(
   IPointcut pointcut,
   Type targetType,
   Type[] proxyInterfaces


The pointcut being tested.
The class being tested.
The interfaces being proxied. If a null reference (Nothing in Visual Basic), all methods on a class may be proxied.

Return Value

true if the pointcut can apply on any method.


This is an important test as it can be used to optimize out a pointcut for a class.

Invoking this method with a targetType that is an interface type will always yield a false return value.

See Also

AopUtils Class | Spring.Aop.Framework Namespace | AopUtils.CanApply Overload List