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

InstanceContent.Convertor (NetBeans Utilities API) - NetBeans API Javadoc 5.5.1

org.openide.util 6.8.31

org.openide.util.lookup
Interface InstanceContent.Convertor

Enclosing class:
InstanceContent

public static interface InstanceContent.Convertor

Convertor postpones an instantiation of an object.

Since:
1.25

Method Summary
 Object convert(Object obj)
          Convert obj to other object.
 String displayName(Object obj)
          The human presentable name for the object.
 String id(Object obj)
          Computes the ID of the resulted object.
 Class type(Object obj)
          Return type of converted object.
 

Method Detail

convert

Object convert(Object obj)
Convert obj to other object. There is no need to implement cache mechanism. It is provided by InstanceLookup.Item.getInstance(). Method should be called more than once because Lookup holds just weak reference.

Parameters:
obj - the registered object
Returns:
the object converted from this object

type

Class type(Object obj)
Return type of converted object.

Parameters:
obj - the registered object
Returns:
the class that will be produced from this object (class or superclass of convert (obj))

id

String id(Object obj)
Computes the ID of the resulted object.

Parameters:
obj - the registered object
Returns:
the ID for the object

displayName

String displayName(Object obj)
The human presentable name for the object.

Parameters:
obj - the registered object
Returns:
the name representing the object for the user

org.openide.util 6.8.31

Built on March 26 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.