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

InstanceCookie.Of (Nodes API) - NetBeans API Javadoc (Current Development Version)

org.openide.nodes 7.0

org.openide.cookies
Interface InstanceCookie.Of

All Superinterfaces:
InstanceCookie, Node.Cookie
Enclosing interface:
InstanceCookie

public static interface InstanceCookie.Of
extends InstanceCookie

Enhanced cookie that can answer queries about the type of the instance it creates. It does not add any additional ability except to improve performance, because it is not necessary to load the actual class of the object into memory.

Since:
1.4

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openide.cookies.InstanceCookie
InstanceCookie.Of
 
Method Summary
 boolean instanceOf(Class<?> type)
          Checks if the object created by this cookie is an instance of the given type.
 
Methods inherited from interface org.openide.cookies.InstanceCookie
instanceClass, instanceCreate, instanceName
 

Method Detail

instanceOf

boolean instanceOf(Class<?> type)
Checks if the object created by this cookie is an instance of the given type. The same as type.isAssignableFrom(instanceClass()) But this can prevent the actual class from being loaded into the Java VM.

Parameters:
type - the class type we want to check
Returns:
true if this cookie will produce an instance of the given type

org.openide.nodes 7.0

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