fr.umlv.jmmf.adapter
Class DefaultAdapterHook
java.lang.Object
|
+--fr.umlv.jmmf.adapter.DefaultAdapterHook
- All Implemented Interfaces:
- AdapterHook, Hook
- public class DefaultAdapterHook
- extends java.lang.Object
- implements AdapterHook
- Version:
- 0.5.9
- Author:
- Remi Forax
|
Field Summary |
protected java.util.Map |
map
map between a NameLengthPair and an invocation option. |
static java.lang.Object |
SEND_ADAPTEE
send the adapter as first parameter of the multi-method
during its invocation. |
static java.lang.Object |
SEND_ADAPTER
send the adaptee as first parameter of the multi-method
during its invocation. |
static java.lang.Object |
SEND_NONE
send no additionnal parameter to the multi-method
during its invocation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEND_NONE
public static final java.lang.Object SEND_NONE
- send no additionnal parameter to the multi-method
during its invocation.
SEND_ADAPTEE
public static final java.lang.Object SEND_ADAPTEE
- send the adapter as first parameter of the multi-method
during its invocation.
SEND_ADAPTER
public static final java.lang.Object SEND_ADAPTER
- send the adaptee as first parameter of the multi-method
during its invocation.
map
protected java.util.Map map
- map between a NameLengthPair and an invocation option.
- See Also:
NameLengthPair
DefaultAdapterHook
public DefaultAdapterHook()
preHook
public void preHook(AdapterPreMessage message)
- the current implementation is a switch on the
invocation option :
if SEND_ADAPTER: insert the adapter as the first parameter.
if SEND_ADAPTEE: insert the adaptee as the first parameter.
if SEND_NONE: do nothing
- Specified by:
preHook in interface AdapterHook
- See Also:
AdapterFactory#addMultiMethod(Object,MultiMethod,Object)
innerHook
public void innerHook(AdapterInnerMessage message)
- default implementation, do nothing!!
- Specified by:
innerHook in interface AdapterHook
postHook
public void postHook(AdapterPostMessage message)
- call isWrappable to know if the result must be rewrapped
and rewrap it if it necessary.
- Specified by:
postHook in interface AdapterHook
- See Also:
AdapterFactory.isWrappable(Object),
AdapterFactory.create(Object)
getInvocationOption
protected java.lang.Object getInvocationOption(AdapterMessage message)
putInvocationOption
protected void putInvocationOption(MultiMethod mm,
java.lang.Object invocationOption)
Rémi Forax 1999,2000 Université de Marne la Vallée