类 EmptyTargetSource
- java.lang.Object
- org.springframework.aop.target.EmptyTargetSource
- 所有已实现的接口:
Serializable
,TargetClassAware
,TargetSource
public class EmptyTargetSource extends Object implements TargetSource, Serializable
CanonicalTargetSource
when there is no target (or just the target class known), and behavior is supplied by interfaces and advisors only.- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
- 序列化表格
字段概要
字段 修饰符和类型 字段 说明 static EmptyTargetSource
INSTANCE
The canonical (Singleton) instance of thisEmptyTargetSource
.
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
equals(Object other)
static EmptyTargetSource
forClass(Class<?> targetClass)
Return an EmptyTargetSource for the given target Class.static EmptyTargetSource
forClass(Class<?> targetClass, boolean isStatic)
Return an EmptyTargetSource for the given target Class.Object
getTarget()
Always returnsnull
.Class<?>
getTargetClass()
Always returns the specified target Class, ornull
if none.int
hashCode()
boolean
isStatic()
Always returnstrue
.void
releaseTarget(Object target)
Nothing to release.String
toString()
字段详细资料
INSTANCE
public static final EmptyTargetSource INSTANCE
The canonical (Singleton) instance of thisEmptyTargetSource
.
方法详细资料
forClass
public static EmptyTargetSource forClass(Class<?> targetClass)
Return an EmptyTargetSource for the given target Class.- 参数:
targetClass
- the target Class (may benull
)- 另请参阅:
getTargetClass()
forClass
public static EmptyTargetSource forClass(Class<?> targetClass, boolean isStatic)
Return an EmptyTargetSource for the given target Class.- 参数:
targetClass
- the target Class (may benull
)isStatic
- whether the TargetSource should be marked as static- 另请参阅:
getTargetClass()
getTargetClass
public Class<?> getTargetClass()
Always returns the specified target Class, ornull
if none.- 指定者:
getTargetClass
在接口中TargetClassAware
- 指定者:
getTargetClass
在接口中TargetSource
- 返回:
- the type of targets returned by this
TargetSource
isStatic
public boolean isStatic()
Always returnstrue
.- 指定者:
isStatic
在接口中TargetSource
- 返回:
true
if the target is immutable- 另请参阅:
TargetSource.getTarget()
getTarget
public Object getTarget()
Always returnsnull
.- 指定者:
getTarget
在接口中TargetSource
- 返回:
- the target object which contains the joinpoint, or
null
if there is no actual target instance
releaseTarget
public void releaseTarget(Object target)
Nothing to release.- 指定者:
releaseTarget
在接口中TargetSource
- 参数:
target
- object obtained from a call toTargetSource.getTarget()