站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

LookupMerger (Project API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.projectapi/1 1.13

org.netbeans.spi.project
Interface LookupMerger<T>


public interface LookupMerger<T>

Allows project lookup to merge instances of known classes and replace them with single instance. To be used in conjunction with the LookupProvider and LookupProviderSupport The interface is to be implemented by the project owner which decides which contracts make sense to have merged and how they are to be merged. The 3rd party LookupProvider implementors provide instances of mergeableClass. LookupProviderSupport.createCompositeLookup(org.openide.util.Lookup, java.lang.String) handles the hiding of individual mergeable instances and exposing the merged instance created by the LookupMerger.

Since:
org.netbeans.modules.projectapi 1.12

Method Summary
 Class<T> getMergeableClass()
          Returns a class which is merged by this implementation of LookupMerger
 T merge(Lookup lookup)
          Merge instances of the given class in the given lookup and return merged object which substitutes them.
 

Method Detail

getMergeableClass

Class<T> getMergeableClass()
Returns a class which is merged by this implementation of LookupMerger

Returns:
Class instance

merge

T merge(Lookup lookup)
Merge instances of the given class in the given lookup and return merged object which substitutes them.

Parameters:
lookup - lookup with the instances
Returns:
object to be used instead of instances in the lookup

org.netbeans.modules.projectapi/1 1.13

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.