Skip navigation links

NetBeans Architecture Answers for Lookup API module

WARNING: answering questions version 1.25 rather than the current 1.29.

Interfaces table

Group of java interfaces
Interface NameIn/OutStabilitySpecified in What Document?
LookupAPIExportedOfficial .../util/lookup/doc-files/lookup-api.html

allows the discovery

LookupSPIExportedOfficial .../util/lookup/doc-files/lookup-spi.html

simplifies creation and registration of own lookup objects

ProviderRegistrationMechanismImportedStandard ...//java.sun.com/j2se/1.3/docs/guide/jar/jar.html

ProviderRegistrationRemovalExportedUnder Development .../org/openide/util/doc-files/api.html

Lookups.metaInfServicesExportedUnder Development .../org/openide/util/lookup/Lookups.html

calls constructor of registered classes using reflection

Lookup.resetDefaultLookupExportedFriend

There is a static private method Lookup.resetDefaultLookup that is called by NbJUnit's MockServices to properly reset default lookup and fire changes to all registred listeners.

Group of java.io.File interfaces
Interface NameIn/OutStabilitySpecified in What Document?
FileLocationExportedUnder Development

the JAR file is located in platform cluster under lib/org-openide-util-lookup.jar

Group of systemproperty interfaces
Interface NameIn/OutStabilitySpecified in What Document?
org.openide.util.LookupExportedUnder Development

checked by the initialization of the Lookup.getDefault() and can contain name of a class that extends org.openide.util.Lookup and has public constructor, that should be instantiated and returned from Lookup.getDefault() the class will be loaded by Thread.currentThread().getContextClassLoader() classloader the first time Lookup.getDefault is invoked.

The property can also contain value "-" which means to completely disable the lookup instantiation and return Lookup.EMPTY from Lookup.getDefault().

If the property is unspecified, the default MetaInfServicesLookup is constructed for Thread.currentThread().getContextclassLoader() that implements the JDK's standard. If, by a chance an instance of Lookup.Provider is found in there, its lookup is returned as result. Otherwise the MetaInfServicesLookup is the result of Lookup.getDefault().

org.openide.util.Lookup.pathsExportedUnder Development

Sometimes it may be useful for the Lookup to contains objects from some system file system folder. This can be done with org.openide.util.Lookup.paths=Folder1:Folder2:Folder3. If this property is set prior to first call to Lookup.getDefault(), it is split into pieces (separator is ':') and individual parts are then used to construct Lookups.forPath("Folder1"), etc. All these lookups then become part of the Lookup.getDefault() one. This property works since version 7.24

Group of lookup interfaces
Interface NameIn/OutStabilitySpecified in What Document?
LookupInitializationLookupExportedUnder Development#systemproperty-org.openide.util.Lookup

during initialization of the Lookup.getDefault() the Lookup.Provider is being searched

LookupSharedClassObjectExportedUnder Development

singleton subclasses of SharedClassObject are searched for using Lookup.

LookupClassLoaderExportedUnder Development

Nearly all resource looking functions and reflective code uses ClassLoader obtained from Lookup.getDefault() for loading system wide resources.


General Information


Project and platform dependencies


Deployment


Compatibility with environment


Access to resources


Lookup of components


Execution Environment


Format of files and protocols


Performance and Scalability