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 names patterns.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
names → List<String>
The name patterns; * matches any characters, everything else literally, and the whole name must match.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

matches(MethodSignature signature, String beanName) → bool
Whether the advice applies to the member described by signature of the bean named beanName.
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