Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.nodes 6.7.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 bring any additional value, but should 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)` Query to found out if the object created by this cookie is instance of given type.

Methods inherited from interface org.openide.cookies.InstanceCookie
`instanceClass, instanceCreate, instanceName`

Method Detail

### instanceOf

    boolean instanceOf(Class type)

  Query to found out if the object created by this cookie is instance of given type. The same code as:

          Class actualClass = instanceClass ();
          result = type.isAsignableFrom (actualClass);

  But this can prevent the class `actualClass` to be loaded into the Java VM.

  Parameters:
    `type` - the class type we want to check
  Returns:
    true if this cookie can produce object of given type

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.nodes 6.7.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.