public abstract class ToolkitRegistry
extends java.lang.Object
Toolkits implementations.Toolkit,
ToolkitProvider| Constructor and Description |
|---|
ToolkitRegistry() |
| Modifier and Type | Method and Description |
|---|---|
abstract ToolkitBuilder |
getBuilder(Context context,
java.lang.Class classOrIntf)
Same as
getBuilder(context.getElement(), context, classOrIntf); |
abstract ToolkitBuilder |
getBuilder(Element element,
Context context,
java.lang.Class classOrIntf)
Given a
Toolkit interface, and a Context, the ToolkitRegistry can
be asked to 'build' an object that implements that interface. |
static ToolkitRegistry |
getInstance() |
abstract <T> java.util.List<T> |
toolkits(Context context,
java.lang.Class<T> classOrIntf)
Convenience method that creates a
ToolkitBuilder and calls the buildAll
method on it. |
abstract <T> java.util.List<T> |
toolkits(Element element,
Context context,
java.lang.Class<T> classOrIntf)
Convenience method that creates a
ToolkitBuilder and calls the buildAll
method on it. |
abstract java.lang.Class[] |
toolkitTypes(Context ideContext,
java.lang.Class classOrIntf)
Convenience method that returns the sub-types (if any) that each
ToolkitProvider
can build. |
abstract java.lang.Class[] |
toolkitTypes(Element element,
Context ideContext,
java.lang.Class classOrIntf)
Convenience method that returns the sub-types (if any) that each
ToolkitProvider
can build. |
public static ToolkitRegistry getInstance()
public abstract ToolkitBuilder getBuilder(Element element, Context context, java.lang.Class classOrIntf) throws ToolkitBuildException
Given a Toolkit interface, and a Context, the ToolkitRegistry can
be asked to 'build' an object that implements that interface. The registry queries all knownToolkitProviders
to find the ones that can build. More than one ToolkitProvider may respond, each
providing a different implementation of the same interface.
If at least one provider is found, a ToolkitBuilder is returned which can then be used to
build all or some of the available objects.
T - element - context - classOrIntf - ToolkitBuildException - if no ToolkitProvider responded to the request.public abstract ToolkitBuilder getBuilder(Context context, java.lang.Class classOrIntf) throws ToolkitBuildException
getBuilder(context.getElement(), context, classOrIntf);context - classOrIntf - ToolkitBuildExceptionpublic abstract <T> java.util.List<T> toolkits(Element element, Context context, java.lang.Class<T> classOrIntf) throws ToolkitBuildException
ToolkitBuilder and calls the buildAll
method on it.T - element - context - classOrIntf - ToolkitBuildException - if no ToolkitProvider responds.public abstract <T> java.util.List<T> toolkits(Context context, java.lang.Class<T> classOrIntf) throws ToolkitBuildException
ToolkitBuilder and calls the buildAll
method on it.T - context - classOrIntf - ToolkitBuildExceptionpublic abstract java.lang.Class[] toolkitTypes(Element element, Context ideContext, java.lang.Class classOrIntf) throws ToolkitBuildException
ToolkitProvider
can build. Use this method only if you wish to examine the classes of toolkits returned
without actually constructing them.element - ideContext - classOrIntf - ToolkitBuildExceptionpublic abstract java.lang.Class[] toolkitTypes(Context ideContext, java.lang.Class classOrIntf) throws ToolkitBuildException
ToolkitProvider
can build. Use this method only if you wish to examine the classes of toolkits returned
without actually constructing them.ideContext - classOrIntf - ToolkitBuildException