org.openide.util.lookup
Class AbstractLookup.R<T>

java.lang.Object
  extended by org.openide.util.Lookup.Result<T>
      extended by org.openide.util.lookup.WaitableResult<T>
          extended by org.openide.util.lookup.AbstractLookup.R<T>
Enclosing class:
AbstractLookup

static final class AbstractLookup.R<T>
extends WaitableResult<T>

Result based on one instance returned.


Field Summary
 AbstractLookup.ReferenceToResult<T> reference
          reference our result is attached to (do not modify)
 
Constructor Summary
AbstractLookup.R()
           
 
Method Summary
 void addLookupListener(LookupListener l)
          Ok, register listeners to all classes and super classes.
 java.util.Set<java.lang.Class<? extends T>> allClasses()
          Set of all classes.
 java.util.Collection<T> allInstances()
          Get all instances in the result.
 java.util.Collection<? extends Lookup.Item<T>> allItems()
          Items are stored directly in the allItems.
protected  void beforeLookup(Lookup.Template t)
          Used by proxy results to synchronize before lookup.
protected  void collectFires(java.util.Collection<java.lang.Object> evAndListeners)
          Delete all cached values, the template changed.
 void removeLookupListener(LookupListener l)
          Ok, register listeners to all classes and super classes.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reference

public AbstractLookup.ReferenceToResult<T> reference
reference our result is attached to (do not modify)

Constructor Detail

AbstractLookup.R

public AbstractLookup.R()
Method Detail

addLookupListener

public void addLookupListener(LookupListener l)
Ok, register listeners to all classes and super classes.

Specified by:
addLookupListener in class Lookup.Result<T>
Parameters:
l - the listener to add

removeLookupListener

public void removeLookupListener(LookupListener l)
Ok, register listeners to all classes and super classes.

Specified by:
removeLookupListener in class Lookup.Result<T>
Parameters:
l - the listener to remove

collectFires

protected void collectFires(java.util.Collection<java.lang.Object> evAndListeners)
Delete all cached values, the template changed.

Specified by:
collectFires in class WaitableResult<T>
Parameters:
evAndListeners - LookupEvent, LookupListener, LookupEvent, LookupListener, etc.

allInstances

public java.util.Collection<T> allInstances()
Description copied from class: Lookup.Result
Get all instances in the result. The return value type should be List instead of Collection, but it is too late to change it.

Specified by:
allInstances in class Lookup.Result<T>
Returns:
unmodifiable collection of all instances that will never change its content

allClasses

public java.util.Set<java.lang.Class<? extends T>> allClasses()
Set of all classes.

Overrides:
allClasses in class Lookup.Result<T>
Returns:
unmodifiable set of Class objects that will never change its content

allItems

public java.util.Collection<? extends Lookup.Item<T>> allItems()
Items are stored directly in the allItems.

Overrides:
allItems in class Lookup.Result<T>
Returns:
unmodifiable collection of Lookup.Item that will never change its content

beforeLookup

protected void beforeLookup(Lookup.Template t)
Used by proxy results to synchronize before lookup.

Specified by:
beforeLookup in class WaitableResult<T>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object