|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
All enhanced instances returned by the Enhancer class implement this interface. Using this interface for new instances is faster than going through the Enhancer interface or using reflection. In addition, to intercept methods called during object construction you must use these methods.
Method Summary | |
Callback |
getCallback(int type)
Returns the current callback in use for the given type; |
Factory |
newInstance(Callback callback)
Creates new instance of the same type, using the no-arg constructor. |
Factory |
newInstance(Callbacks callbacks)
Creates new instance of the same type, using the no-arg constructor. |
Factory |
newInstance(java.lang.Class[] types,
java.lang.Object[] args,
Callbacks callbacks)
Creates a new instance of the same type, using the constructor matching the given signature. |
void |
setCallback(int type,
Callback callback)
Set the callback for this object for the given type. |
void |
setCallbacks(Callbacks callbacks)
Replace all of the callbacks for this object at once. |
Method Detail |
public Factory newInstance(Callback callback)
callback
- the new interceptor to use
newInstance(Callbacks)
public Factory newInstance(Callbacks callbacks)
callbacks
- the new callbacks(s) to use
public Factory newInstance(java.lang.Class[] types, java.lang.Object[] args, Callbacks callbacks)
types
- the constructor argument typesargs
- the constructor argumentscallbacks
- the new interceptor(s) to use
public Callback getCallback(int type)
type
- the callback typeCallbacks
public void setCallback(int type, Callback callback)
type
- the callback type to replacecallback
- the new callbackpublic void setCallbacks(Callbacks callbacks)
callbacks
- the new callbacks(s) to use
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |