|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.core.adapt.DefaultAdaptorFactory
public class DefaultAdaptorFactory
default implementation for creating adaptors in ACTF. Clients should subclass this implementation rather than
implementing IAdaptorFactory
.
Field Summary | |
---|---|
protected static ClassLoaderCache |
_clCache
|
Constructor Summary | |
---|---|
protected |
DefaultAdaptorFactory()
create a default adaptor factory |
Method Summary | |
---|---|
IAdaptor[] |
getAdaptors(Class type)
retrieves the adaptors for the given type. |
IAdaptor[] |
getAdaptors(String className)
retrieves the adaptors for the class name. |
IAdaptor[] |
getAllAdaptors(Class targetType)
retrieves the adaptors not only for the given type but for all types of which this class is assignable. |
static DefaultAdaptorFactory |
getInstance()
|
void |
registerAdaptor(Class type,
IAdaptor adaptor)
registers an adaptor for the given type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final ClassLoaderCache _clCache
Constructor Detail |
---|
protected DefaultAdaptorFactory()
Method Detail |
---|
public static DefaultAdaptorFactory getInstance()
public void registerAdaptor(Class type, IAdaptor adaptor)
getSupportedTypes
method.
registerAdaptor
in interface IAdaptorFactory
type
- - type for which adaptor is being registeredIAdaptor.getSupportedTypes()
public IAdaptor[] getAdaptors(Class type)
registerAdaptor
method.
getAdaptors
in interface IAdaptorFactory
type
- - type for which adaptors are desired
public IAdaptor[] getAdaptors(String className)
registerAdaptor
method.
getAdaptors
in interface IAdaptorFactory
className
- - class name for which adaptors are desired
public IAdaptor[] getAllAdaptors(Class targetType)
getAdaptors
in that getAdaptors
returns those Adaptors only for that type
while this method also tries to determine whether the
class type argument is a subclass of a class type registered. For instance,
a class type of org.eclipse.swt.widgets.Composite
may not have
any adaptors registered for it but it is a subclass of org.eclipse.swt.widgets.Control
,
which may have adaptors registered for it. In any case,
all of the adaptors returned are those that were registered via the registerAdaptor
method.
getAllAdaptors
in interface IAdaptorFactory
targetType
- - type for which adaptors are desired
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |