1 | public ComposeableAdapterFactory getRootAdapterFactory()↵ | | 1 | public ComposeableAdapterFactory getRootAdapterFactory()↵
|
2 | {↵ | | 2 | {↵
|
3 | return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();↵ | | 3 | return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();↵
|
4 | }↵ | | 4 | }↵
|
|
5 | /**↵ | | 5 | /**↵
|
6 | * This sets the composed adapter factory that contains this factory.↵ | | 6 | * This sets the composed adapter factory that contains this factory.↵
|
7 | * <!-- begin-user-doc -->↵ | | |
|
8 | * <!-- end-user-doc -->↵ | | |
|
9 | * @generated↵ | | |
|
10 | */↵ | | 7 | */↵
|
11 | public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)↵ | | 8 | public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)↵
|
12 | {↵ | | 9 | {↵
|
13 | this.parentAdapterFactory = parentAdapterFactory;↵ | | 10 | this.parentAdapterFactory = parentAdapterFactory;↵
|
14 | }↵ | | 11 | }↵
|
|
15 | /**↵ | | 12 | ↵
|
16 | * <!-- begin-user-doc -->↵ | | |
|
17 | * <!-- end-user-doc -->↵ | | |
|
18 | * @generated NOT↵ | | |
|
19 | */↵ | | |
|
20 | @Override↵ | | |
|
21 | public boolean isFactoryForType(Object type)↵ | | |
|
22 | {↵ | | |
|
23 | return supportedTypes.contains(type) || type == modelPackage;↵ | | |
|
24 | }↵ | | |
|
|
25 | /**↵ | | |
|
26 | * This implementation substitutes the factory itself as the key for the adapter.↵ | | |
|
27 | * <!-- begin-user-doc -->↵ | | |
|
28 | * <!-- end-user-doc -->↵ | | |
|
29 | * @generated↵ | | |
|
30 | */↵ | | 13 | @Override↵
|
| | | 14 | public boolean isFactoryForType(Object type)↵
|
| | | 15 | {↵
|
| | | 16 | return super.isFactoryForType(type) || supportedTypes.contains(type);↵
|
| | | 17 | }↵
|
|
31 | @Override↵ | | 18 | @Override↵
|
32 | public Adapter adapt(Notifier notifier, Object type)↵ | | 19 | public Adapter adapt(Notifier notifier, Object type)↵
|
33 | {↵ | | 20 | {↵
|
34 | return super.adapt(notifier, this);↵ | | 21 | return super.adapt(notifier, this);↵
|
35 | }↵ | | 22 | }↵
|
|
36 | /**↵ | | |
|
37 | * <!-- begin-user-doc -->↵ | | |
|
38 | * <!-- end-user-doc -->↵ | | |
|
39 | * @generated↵ | | |
|
40 | */↵ | | |
|
41 | @Override↵ | | 23 | @Override↵
|
42 | public Object adapt(Object object, Object type)↵ | | 24 | public Object adapt(Object object, Object type)↵
|
43 | {↵ | | 25 | {↵
|
44 | if (isFactoryForType(type))↵ | | 26 | if (isFactoryForType(type))↵
|
45 | {↵ | | 27 | {↵
|
46 | Object adapter = super.adapt(object, type);↵ | | 28 | Object adapter = super.adapt(object, type);↵
|
47 | if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter)))↵ | | 29 | if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter)))↵
|
48 | {↵ | | 30 | {↵
|
49 | return adapter;↵ | | 31 | return adapter;↵
|
50 | }↵ | | 32 | }↵
|
51 | }↵ | | 33 | }↵
|
|
52 | return null; | | 34 | return null;
|