|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.wicketstuff.springreference.AbstractSpringReference<T>
T - type of the wrapped spring beanpublic abstract class AbstractSpringReference<T>
An abstract base class for referring spring beans.
This class supports serialization. The referred spring bean does not get serialized, after deserialization it is looked up again on the first access.
Subclasses must implement the getSupporter() method used to locate the
AbstractSpringReferenceSupporter object. This class does not depend on wicket or
spring-web. So in theory subclasses can be used in non-wicket, non-web spring applications too.
| Constructor Summary | |
|---|---|
protected |
AbstractSpringReference(Class<T> clazz,
String name)
Constructor. |
| Method Summary | |
|---|---|
AbstractSpringReference<T> |
clone()
|
boolean |
equals(Object obj)
|
T |
get()
Returns the referred spring bean. |
protected Class<T> |
getClazz()
|
protected String |
getName()
Can change during lookup if it was not set originally. |
protected abstract AbstractSpringReferenceSupporter |
getSupporter()
|
int |
hashCode()
|
protected boolean |
isClazzBasedOnlyLookup()
|
protected void |
setInstanceRef(WeakReference<T> instanceRef)
|
protected void |
setName(String name)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractSpringReference(Class<T> clazz,
String name)
clazz - class of the wrapped spring bean, not nullname - beanName of the wrapped spring bean, can be null| Method Detail |
|---|
public T get()
RuntimeException if the bean could not be
found.public AbstractSpringReference<T> clone()
clone in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectprotected abstract AbstractSpringReferenceSupporter getSupporter()
protected void setInstanceRef(WeakReference<T> instanceRef)
instanceRef - weak reference to the spring beanprotected String getName()
protected void setName(String name)
name - name of the spring beanprotected Class<T> getClazz()
protected boolean isClazzBasedOnlyLookup()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||