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
.Always returns the specified target Class, ornull
if none.int
hashCode()
boolean
isStatic()
Always returnstrue
.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.aop.TargetSource
releaseTarget
-
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
-
equals
-
hashCode
public int hashCode() -
toString
-