
Adds a proper resolution for system default lookup Lookup.get_default().David Strupl - Common lookup implementations.Jaroslav Tulach - Lookup API, AbstractLookup, InstanceContent, ArrayStorage.Axel Voitier add yourself when you contribute! Original Netbeans authors of Lookup API.lookups.EmptyLookup: A lookup containing nothing.Ī list of people who have contributed to Lookups in order of their first.lookups.singleton: Unmodifiable lookup that contains just one fixed object.

lookup.SimpleLookup: A basic lookup with a static content.lookups.fixed: Simple unmodifiable lookup.lookups.EntryPointLookup: A lookup loading its instances from a setuptools entry point group (ie.lookups.DelegatedLookup: A lookup that redirects to another (dynamic) lookup, through a LookupProvider.lookups.ProxyLookup: A lookup that merge results from several lookups._default(): The default lookup in a system.

remove ( child1 ) # -> This will invoke call_me_back() # You can also provide a `` when # creating the content to control how the listeners are called: # InstanceContent(notify_in: Executor = None). all_classes () # Lookup result listener def call_me_back ( result ): print ( 'Result changed. # Here it would be set(ParentClass, ChildClass) parent_result. all_instances () # all_classes(): Immutable set of all types in the result. similar to plain lookup_all()) parent_result. lookup_result ( ParentClass ) # all_instances(): all instances corresponding to the searched # class (ie. lookup_all ( ChildClass ) # lookup_result(cls): get a Result object for the searched class parent_result = my_lookup. lookup_all ( ParentClass ) # all_children_matches is an immutable sequence # of child1 and child2 all_children_matches = my_lookup. lookup ( ParentClass ) # lookup_all(cls): get all matching instances # all_parent_matches is an immutable sequence # of parent, child1 and child2 all_parent_matches = my_lookup. # lookup(cls): get first matching instance # a_match will be any of parent, child1 or child2 a_parent_match = my_lookup. add ( child1 ) child2 = ChildClass () my_content. add ( parent ) child1 = ChildClass () my_content.

lookups.Item can provide you with additional info on an instance: display string, persistence ID string, type, and instance itself.That is, an 'instance' can appear in a lookup but not be instanciated until it is actually used (ie. Deferred instanciation with lookups.Convertor.You will be notified when an instance of that class is added/removed from the lookup. You can get hold of a lookups.Result, which allows you to register a listener for a given class search.

