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

All Superinterfaces:
  Node.Cookie

All Known Subinterfaces:
  InstanceCookie.Of

    public interface InstanceCookie

extends Node.Cookie

Cookie that should be provided by all nodes that are able to create a "instance".

For example, Beans (class form, or serialized) may be instantiated in the usual fashion (say, for subsequent serialization); visual components may be instantiated into the Form Editor; folders of components may be "instantiated" into a Palette toolbar; and so on.

Nested Class Summary
`static interface` | `InstanceCookie.Of` Enhanced cookie that can answer queries about the type of the instance it creates.

Method Summary
`Class` | `instanceClass()` The representation type that may be created as instances.
`Object` | `instanceCreate()` Create an instance.
`String` | `instanceName()` The name of `instanceClass()`.

Method Detail

### instanceName

    String instanceName()

  The name of `instanceClass()`.

  Returns:
    the instance class name

### instanceClass

    Class instanceClass()
                        throws IOException,
                               ClassNotFoundException

  The representation type that may be created as instances. Can be used to test whether the instance is of an appropriate class without actually creating it.

  Returns:
    the representation class of the instance
  Throws:
    `IOException` - if an I/O error occurred
    `ClassNotFoundException` - if a class was not found

### instanceCreate

    Object instanceCreate()
                          throws IOException,
                                 ClassNotFoundException

  Create an instance.

  Returns:
    the instance of type `instanceClass()` (or a subclass)
  Throws:
    `IOException` - if an I/O error occured
    `ClassNotFoundException` - if a class was not found

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.