类 EmptyTargetSource
- java.lang.Object
- org.springframework.aop.target.EmptyTargetSource
- 所有已实现的接口:
Serializable,TargetClassAware,TargetSource
public final class EmptyTargetSource extends Object implements TargetSource, Serializable
CanonicalTargetSourcewhen there is no target (or just the target class known), and behavior is supplied by interfaces and advisors only.- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
- 序列化表格
字段概要
字段 修饰符和类型 字段 说明 static EmptyTargetSourceINSTANCEThe canonical (Singleton) instance of thisEmptyTargetSource.
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(Object other)static EmptyTargetSourceforClass(Class<?> targetClass)Return an EmptyTargetSource for the given target Class.static EmptyTargetSourceforClass(Class<?> targetClass, boolean isStatic)Return an EmptyTargetSource for the given target Class.ObjectgetTarget()Always returnsnull.Class<?>getTargetClass()Always returns the specified target Class, ornullif none.inthashCode()booleanisStatic()Always returnstrue.voidreleaseTarget(Object target)Nothing to release.StringtoString()
字段详细资料
INSTANCE
public static final EmptyTargetSource INSTANCE
The canonical (Singleton) instance of thisEmptyTargetSource.
方法详细资料
forClass
public static EmptyTargetSource forClass(@Nullable Class<?> targetClass)
Return an EmptyTargetSource for the given target Class.- 参数:
targetClass- the target Class (may benull)- 另请参阅:
getTargetClass()
forClass
public static EmptyTargetSource forClass(@Nullable 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
@Nullable public Class<?> getTargetClass()
Always returns the specified target Class, ornullif none.- 指定者:
getTargetClass在接口中TargetClassAware- 指定者:
getTargetClass在接口中TargetSource- 返回:
- the type of targets returned by this
TargetSource
isStatic
public boolean isStatic()
Always returnstrue.- 指定者:
isStatic在接口中TargetSource- 返回:
trueif the target is immutable- 另请参阅:
TargetSource.getTarget()
getTarget
@Nullable public Object getTarget()
Always returnsnull.- 指定者:
getTarget在接口中TargetSource- 返回:
- the target object which contains the joinpoint, or
nullif 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()