public final class Contexts extends Object
browser context. Start with newBuilder()
and then assign technologies with Contexts.Builder.register(java.lang.Class, java.lang.Object, int)
method.| Modifier and Type | Class and Description |
|---|---|
static class |
Contexts.Builder
Support for providers of new
BrwsrCtx. |
static interface |
Contexts.Provider
Implementors of various HTML technologies should
register their implementation via
org.openide.util.lookup.ServiceProvider, so
ServiceLoader can find them, when their JARs are included
on the classpath of the running application. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
fillInByProviders(Class<?> requestor,
Contexts.Builder cb)
Seeks
ServiceLoader for all registered instances of
Contexts.Provider and asks them to fill
the builder. |
static <Tech> Tech |
find(BrwsrCtx context,
Class<Tech> technology)
Seeks for the specified technology in the provided context.
|
static Contexts.Builder |
newBuilder()
Creates new, empty builder for creation of
BrwsrCtx. |
public static Contexts.Builder newBuilder()
BrwsrCtx. At the
end call the Contexts.Builder.build() method to generate the context.public static <Tech> Tech find(BrwsrCtx context, Class<Tech> technology)
Tech - type of the technologycontext - the context to seek in
(previously filled with (Contexts.Builder.register(java.lang.Class, java.lang.Object, int))technology - class that identifies the technologynullpublic static boolean fillInByProviders(Class<?> requestor, Contexts.Builder cb)
ServiceLoader for all registered instances of
Contexts.Provider and asks them to fill
the builder.requestor - the application class for which to find the contextcb - the context builder to register technologies intotrue, if some instances of the provider were
found, false otherwiseCopyright © 2014 NetBeans. All Rights Reserved.