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 instead of reflection.
| Modifier and Type | Method and Description |
|---|---|
| public Callback | Returns: the callback implementationthe callback index index)Return the |
| public Callback[] | |
| public Object | Returns: new instance of the same typethe new interceptor to use callback)Creates new instance of the same type, using the no-arg constructor. |
| public Object | Returns: new instance of the same typethe new callbacks(s) to use callbacks)Creates new instance of the same type, using the no-arg constructor. |
| public Object | Returns: new instance of the same typethe constructor argument types types, Object[] the constructor arguments args, Callback[] the new interceptor(s) to use callbacks)Creates a new instance of the same type, using the constructor matching the given signature. |
| public void | setCallback(int
the callback index to replace index, Callback the new callback callback)Set the callback for this object for the given type. |
| public void | setCallbacks(Callback[]
the new callbacks(s) to use callbacks)Replace all of the callbacks for this object at once. |
| getCallback | back to summary |
|---|---|
| public Callback getCallback(int index) Return the
| |
| getCallbacks | back to summary |
|---|---|
| public Callback[] getCallbacks() Get the current set of callbacks for ths object.
| |
| newInstance | back to summary |
|---|---|
| public Object newInstance(Callback callback) Creates new instance of the same type, using the no-arg constructor. The class of this object must have been created using a single Callback type. If multiple callbacks are required an exception will be thrown. | |
| newInstance | back to summary |
|---|---|
| public Object newInstance(Callback[] callbacks) Creates new instance of the same type, using the no-arg constructor. | |
| newInstance | back to summary |
|---|---|
| public Object newInstance(Class<T>[] types, Object[] args, Callback[] callbacks) Creates a new instance of the same type, using the constructor matching the given signature. | |
| setCallback | back to summary |
|---|---|
| public void setCallback(int index, Callback callback) Set the callback for this object for the given type.
| |
| setCallbacks | back to summary |
|---|---|
| public void setCallbacks(Callback[] callbacks) Replace all of the callbacks for this object at once.
| |