NameMatchMethodPointcut class final
A pointcut that matches members by name, with * wildcards.
Use it in an advisor when the advised members follow a naming
convention, like find*. It matches the name only, in every bean and
for getters and setters too; combine it with other pointcuts in a
ComposablePointcut to narrow it.
// Caches the find* methods and count.
DefaultPointcutAdvisor(
const NameMatchMethodPointcut(['find*', 'count']),
CachingInterceptor(),
);
Spring (Java):
NameMatchMethodPointcut pointcut = new NameMatchMethodPointcut();
pointcut.setMappedNames("find*", "count");
new DefaultPointcutAdvisor(pointcut, new CachingInterceptor());
- Implemented types
Constructors
-
NameMatchMethodPointcut(List<
String> names) -
Matches members whose name matches any of the
namespatterns.const
Properties
Methods
-
matches(
MethodSignature signature, String beanName) → bool -
Whether the advice applies to the member described by
signatureof the bean namedbeanName.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited