- java.lang.Object
-
- org.eclipse.emf.common.notify.impl.AdapterFactoryImpl
-
- org.nasdanika.emf.ComposeableAdapterFactoryImpl
-
- org.nasdanika.emf.DelegatingAdapterFactory<T>
-
- org.nasdanika.emf.BiFunctionAdapterFactory<T,N>
-
- Type Parameters:
T
- Adapter type.N
- Notifier type.
- All Implemented Interfaces:
AdapterFactory
,ComposeableAdapterFactory
public class BiFunctionAdapterFactory<T,N> extends DelegatingAdapterFactory<T>
Adapter factory which creates an adapter using aBiFunction
, e.g. a constructor with two parameters. The first argument is the notifier, the second is the factory. The second argument can be used to get access to the root adapter factory, e.g. for retrieval of contextual information.
-
-
Constructor Summary
Constructors Constructor Description BiFunctionAdapterFactory(Class<T> type, ClassLoader proxyClassLoader, BiFunction<N,BiFunctionAdapterFactory<T,N>,T> biFunction)
BiFunctionAdapterFactory(EClass eClass, Class<T> type, ClassLoader proxyClassLoader, BiFunction<N,BiFunctionAdapterFactory<T,N>,T> biFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected T
doCreateAdapter(Notifier target)
Creates adapter.-
Methods inherited from class org.nasdanika.emf.DelegatingAdapterFactory
allInterfaces, createAdapter, isFactoryForType
-
Methods inherited from class org.nasdanika.emf.ComposeableAdapterFactoryImpl
getEClasses, getRootAdapterFactory, setParentAdapterFactory
-
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterFactoryImpl
adapt, adapt, adaptAllNew, adaptNew, associate, createAdapter, resolve
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.emf.common.notify.AdapterFactory
adapt, adapt, adaptAllNew, adaptNew
-
-
-
-
Constructor Detail
-
BiFunctionAdapterFactory
public BiFunctionAdapterFactory(Class<T> type, ClassLoader proxyClassLoader, BiFunction<N,BiFunctionAdapterFactory<T,N>,T> biFunction)
- Parameters:
type
-proxyClassLoader
-biFunction
-
-
BiFunctionAdapterFactory
public BiFunctionAdapterFactory(EClass eClass, Class<T> type, ClassLoader proxyClassLoader, BiFunction<N,BiFunctionAdapterFactory<T,N>,T> biFunction)
-
-
Method Detail
-
doCreateAdapter
protected T doCreateAdapter(Notifier target)
Description copied from class:DelegatingAdapterFactory
Creates adapter. This adapter does not have to implementAdapter
. If it does not then a proxy will be created implementing both T and adapter.- Specified by:
doCreateAdapter
in classDelegatingAdapterFactory<T>
- Returns:
-
-