|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.notify.impl.AdapterFactoryImpl
public class AdapterFactoryImpl
An extensible adapter factory implementation.
Constructor Summary | |
---|---|
AdapterFactoryImpl()
Creates an instance. |
Method Summary | |
---|---|
Adapter |
adapt(Notifier target,
java.lang.Object type)
Returns either a previously associated adapter or a newly associated adapter, as appropriate. |
java.lang.Object |
adapt(java.lang.Object target,
java.lang.Object type)
Returns either the result of calling adapt(Notifier, Object)
or the result of calling resolve(Object, Object) ,
depending on whether the target is a notifier. |
void |
adaptAllNew(Notifier target)
Creates an adapter by calling createAdapter(Notifier)
and associates it by calling associate . |
Adapter |
adaptNew(Notifier target,
java.lang.Object type)
Creates an adapter by calling createAdapter(Notifier, Object)
and associates it by calling associate . |
protected void |
associate(Adapter adapter,
Notifier target)
Associates an adapter with a notifier by adding it to the target's adapters . |
protected Adapter |
createAdapter(Notifier target)
Creates an AdapterImpl . |
protected Adapter |
createAdapter(Notifier target,
java.lang.Object type)
Creates an adapter by calling createAdapter(Notifier) . |
boolean |
isFactoryForType(java.lang.Object type)
Returns false . |
protected java.lang.Object |
resolve(java.lang.Object object,
java.lang.Object type)
Returns the object itself. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdapterFactoryImpl()
Method Detail |
---|
public boolean isFactoryForType(java.lang.Object type)
false
.
isFactoryForType
in interface AdapterFactory
type
- the key indicating the type of adapter in question.
false
.Adapter.isAdapterForType(java.lang.Object)
public java.lang.Object adapt(java.lang.Object target, java.lang.Object type)
adapt(Notifier, Object)
or the result of calling resolve(Object, Object)
,
depending on whether the target is a notifier.
adapt
in interface AdapterFactory
target
- arbitrary object to adapt.type
- the key indicating the type of adapter required.
adapt(Notifier,Object)
,
resolve(Object, Object)
protected java.lang.Object resolve(java.lang.Object object, java.lang.Object type)
adapt(Object, Object)
for objects that aren't notifiers.
object
- arbitrary object to adapt.type
- the key indicating the type of adapter required.
adapt(Object,Object)
public Adapter adapt(Notifier target, java.lang.Object type)
AdapterFactory
create
a new adapter if possible.
adapt
in interface AdapterFactory
target
- the notifier to adapt.type
- the key indicating the type of adapter required.
null
otherwise.Adapter.setTarget(org.eclipse.emf.common.notify.Notifier)
,
AdapterFactory.adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)
public Adapter adaptNew(Notifier target, java.lang.Object type)
createAdapter(Notifier, Object)
and associates it by calling associate
.
adaptNew
in interface AdapterFactory
target
- the notifier to adapt.type
- the key indicating the type of adapter required.
createAdapter(Notifier, Object)
,
associate(Adapter, Notifier)
public void adaptAllNew(Notifier target)
createAdapter(Notifier)
and associates it by calling associate
.
adaptAllNew
in interface AdapterFactory
target
- notifier to adapt.createAdapter(Notifier)
protected Adapter createAdapter(Notifier target, java.lang.Object type)
createAdapter(Notifier)
.
target
- the notifier to adapt.type
- the key indicating the type of adapter required.
createAdapter(Notifier)
protected Adapter createAdapter(Notifier target)
AdapterImpl
.
target
- the notifier to adapt.
createAdapter(Notifier)
protected void associate(Adapter adapter, Notifier target)
adapters
.
adapter
- the new adapter to associate.target
- the notifier being adapted.
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |