public class

EmptyTargetSource

extends Object
implements Serializable TargetSource
java.lang.Object
   ↳ org.springframework.aop.target.EmptyTargetSource

Class Overview

Canonical TargetSource when there is no target (or just the target class known), and behavior is supplied by interfaces and advisors only.

Summary

Fields
public static final EmptyTargetSource INSTANCE The canonical (Singleton) instance of this EmptyTargetSource.
Public Methods
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 returns null.
Class<?> getTargetClass()
Always returns the specified target Class, or null if none.
int hashCode()
boolean isStatic()
Always returns true.
void releaseTarget(Object target)
Nothing to release.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.aop.TargetClassAware
From interface org.springframework.aop.TargetSource

Fields

public static final EmptyTargetSource INSTANCE

The canonical (Singleton) instance of this EmptyTargetSource.

Public Methods

public boolean equals (Object other)

public static EmptyTargetSource forClass (Class targetClass)

Return an EmptyTargetSource for the given target Class.

Parameters
targetClass the target Class (may be null)
See Also

public static EmptyTargetSource forClass (Class targetClass, boolean isStatic)

Return an EmptyTargetSource for the given target Class.

Parameters
targetClass the target Class (may be null)
isStatic whether the TargetSource should be marked as static
See Also

public Object getTarget ()

Always returns null.

Returns
  • the target object, which contains the joinpoint

public Class<?> getTargetClass ()

Always returns the specified target Class, or null if none.

Returns

public int hashCode ()

public boolean isStatic ()

Always returns true.

Returns
  • true if the target is immutable

public void releaseTarget (Object target)

Nothing to release.

Parameters
target object obtained from a call to getTarget()

public String toString ()