|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.util.Lookup org.openide.util.lookup.ProxyLookup
Implementation of lookup that can delegate to others.
Nested Class Summary |
Nested classes inherited from class org.openide.util.Lookup |
Lookup.Item, Lookup.Provider, Lookup.Result, Lookup.Template |
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. |
Object |
lookup(Class clazz)
Look up an object matching a given interface. |
Lookup.Result |
lookup(Lookup.Template template)
The general lookup method. |
Lookup.Item |
lookupItem(Lookup.Template template)
Look up the first item matching a given template. |
protected void |
setLookups(Lookup[] lookups)
Change the delegates. |
String |
toString()
|
Methods inherited from class org.openide.util.Lookup |
getDefault |
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 Object lookup(Class clazz)
Lookup
clazz
- class of the object we are searching for
null
if no such
implementation is foundpublic final Lookup.Item lookupItem(Lookup.Template template)
Lookup
lookupItem
in class Lookup
template
- the template to check
null
public final Lookup.Result lookup(Lookup.Template 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |