- All Superinterfaces:
- All Known Implementing Classes:
TargetSourceis used to obtain the current "target" of an AOP invocation, which will be invoked via reflection if no around advice chooses to end the interceptor chain itself.
TargetSource is "static", it will always return
the same target, allowing optimizations in the AOP framework. Dynamic
target sources can support pooling, hot swapping, etc.
Application developers don't usually need to work with
TargetSources directly: this is an AOP framework interface.
- Rod Johnson, Juergen Hoeller
getTargetClassReturn the type of targets returned by this
null, although certain usages of a
TargetSourcemight just work with a predetermined target class.
isStaticboolean isStatic()Will all calls to
getTarget()return the same object?
trueif the target is immutable
- See Also:
getTargetReturn a target instance. Invoked immediately before the AOP framework calls the "target" of an AOP method invocation.
- the target object which contains the joinpoint,
nullif there is no actual target instance
Exception- if the target object can't be resolved