|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.target.EmptyTargetSource
public class EmptyTargetSource
Canonical TargetSource
when there is no target
(or just the target class known), and behavior is supplied
by interfaces and advisors only.
Field Summary | |
---|---|
static EmptyTargetSource |
INSTANCE
The canonical (Singleton) instance of this EmptyTargetSource . |
private boolean |
isStatic
|
private static long |
serialVersionUID
use serialVersionUID from Spring 1.2 for interoperability |
private java.lang.Class |
targetClass
|
Constructor Summary | |
---|---|
private |
EmptyTargetSource(java.lang.Class targetClass,
boolean isStatic)
Create a new instance of the EmptyTargetSource class. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object other)
|
static EmptyTargetSource |
forClass(java.lang.Class targetClass)
Return an EmptyTargetSource for the given target Class. |
static EmptyTargetSource |
forClass(java.lang.Class targetClass,
boolean isStatic)
Return an EmptyTargetSource for the given target Class. |
java.lang.Object |
getTarget()
Always returns null . |
java.lang.Class<?> |
getTargetClass()
Always returns the specified target Class, or null if none. |
int |
hashCode()
|
boolean |
isStatic()
Always returns true . |
private java.lang.Object |
readResolve()
Returns the canonical instance on deserialization in case of no target class, thus protecting the Singleton pattern. |
void |
releaseTarget(java.lang.Object target)
Nothing to release. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
public static final EmptyTargetSource INSTANCE
EmptyTargetSource
.
private final java.lang.Class targetClass
private final boolean isStatic
Constructor Detail |
---|
private EmptyTargetSource(java.lang.Class targetClass, boolean isStatic)
EmptyTargetSource
class.
This constructor is private
to enforce the
Singleton pattern / factory method pattern.
targetClass
- the target class to expose (may be null
)isStatic
- whether the TargetSource is marked as staticMethod Detail |
---|
public static EmptyTargetSource forClass(java.lang.Class targetClass)
targetClass
- the target Class (may be null
)getTargetClass()
public static EmptyTargetSource forClass(java.lang.Class targetClass, boolean isStatic)
targetClass
- the target Class (may be null
)isStatic
- whether the TargetSource should be marked as staticgetTargetClass()
public java.lang.Class<?> getTargetClass()
null
if none.
getTargetClass
in interface TargetClassAware
getTargetClass
in interface TargetSource
TargetSource
public boolean isStatic()
true
.
isStatic
in interface TargetSource
true
if the target is immutableTargetSource.getTarget()
public java.lang.Object getTarget()
null
.
getTarget
in interface TargetSource
public void releaseTarget(java.lang.Object target)
releaseTarget
in interface TargetSource
target
- object obtained from a call to TargetSource.getTarget()
private java.lang.Object readResolve()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |