Package org.springframework.aop.target
Class EmptyTargetSource
java.lang.Object
org.springframework.aop.target.EmptyTargetSource
- All Implemented Interfaces:
Serializable
,TargetClassAware
,TargetSource
Canonical
TargetSource
when there is no target
(or just the target class known), and behavior is supplied
by interfaces and advisors only.- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final EmptyTargetSource
The canonical (Singleton) instance of thisEmptyTargetSource
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static EmptyTargetSource
Return an EmptyTargetSource for the given target Class.static EmptyTargetSource
Return an EmptyTargetSource for the given target Class.Always returnsnull
.Class<?>
Always returns the specified target Class, ornull
if none.int
hashCode()
boolean
isStatic()
Always returnstrue
.void
releaseTarget
(Object target) Nothing to release.toString()
-
Field Details
-
INSTANCE
The canonical (Singleton) instance of thisEmptyTargetSource
.
-
-
Method Details
-
forClass
Return an EmptyTargetSource for the given target Class.- Parameters:
targetClass
- the target Class (may benull
)- See Also:
-
forClass
Return an EmptyTargetSource for the given target Class.- Parameters:
targetClass
- the target Class (may benull
)isStatic
- whether the TargetSource should be marked as static- See Also:
-
getTargetClass
Always returns the specified target Class, ornull
if none.- Specified by:
getTargetClass
in interfaceTargetClassAware
- Specified by:
getTargetClass
in interfaceTargetSource
- Returns:
- the type of targets returned by this
TargetSource
-
isStatic
public boolean isStatic()Always returnstrue
.- Specified by:
isStatic
in interfaceTargetSource
- Returns:
true
if the target is immutable- See Also:
-
getTarget
Always returnsnull
.- Specified by:
getTarget
in interfaceTargetSource
- Returns:
- the target object which contains the joinpoint,
or
null
if there is no actual target instance
-
releaseTarget
Nothing to release.- Specified by:
releaseTarget
in interfaceTargetSource
- Parameters:
target
- object obtained from a call toTargetSource.getTarget()
-
equals
-
hashCode
public int hashCode() -
toString
-