|
org.openide.util 7.9.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openide.util.Lookup
org.openide.util.lookup.ProxyLookup
public class ProxyLookup
Implementation of lookup that can delegate to others.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.openide.util.Lookup |
---|
Lookup.Item<T>, Lookup.Provider, Lookup.Result<T>, Lookup.Template<T> |
Field Summary |
---|
Fields inherited from class org.openide.util.Lookup |
---|
EMPTY |
Constructor Summary | |
---|---|
protected |
ProxyLookup()
Create a lookup initially proxying to no others. |
|
ProxyLookup(Lookup... lookups)
Create a proxy to some other lookups. |
Method Summary | ||
---|---|---|
protected void |
beforeLookup(Lookup.Template<?> template)
Notifies subclasses that a query is about to be processed. |
|
protected Lookup[] |
getLookups()
Getter for the delegates. |
|
|
lookup(Class<T> clazz)
Look up an object matching a given interface. |
|
|
lookup(Lookup.Template<T> template)
The general lookup method. |
|
|
lookupItem(Lookup.Template<T> template)
Look up the first item matching a given template. |
|
protected void |
setLookups(Lookup... lookups)
Changes the delegates. |
|
String |
toString()
|
Methods inherited from class org.openide.util.Lookup |
---|
getDefault, lookupAll, lookupResult |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProxyLookup(Lookup... lookups)
lookups
- the initial delegatesprotected ProxyLookup()
Method Detail |
---|
public String toString()
protected final Lookup[] getLookups()
protected final void setLookups(Lookup... lookups)
lookups
- the new lookups to delegate toprotected void beforeLookup(Lookup.Template<?> template)
setLookups
method
to change/update the set of objects the proxy delegates to.
template
- the template of the querypublic final <T> T lookup(Class<T> clazz)
Lookup
clazz
- class of the object we are searching for
null
if no such
implementation is foundpublic final <T> Lookup.Item<T> lookupItem(Lookup.Template<T> template)
Lookup
lookupItem
in class Lookup
template
- the template to check
null
public final <T> Lookup.Result<T> lookup(Lookup.Template<T> template)
Lookup
template
, request more info about
them in form of Lookup.Item
and attach a listener to
this be notified about changes. The general interface does not
specify whether subsequent calls with the same template produce new
instance of the Lookup.Result
or return shared instance. The
prefered behaviour however is to return shared one.
template
- a template describing the services to look for
|
org.openide.util 7.9.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |