org.openide.loaders
Class InstanceSupport.Instance

java.lang.Object
  |
  +--org.openide.loaders.InstanceSupport.Instance
All Implemented Interfaces:
InstanceCookie, Node.Cookie
Enclosing class:
InstanceSupport

public static class InstanceSupport.Instance
extends Object
implements InstanceCookie

Trivial supporting instance cookie for already-existing objects.


Inner classes inherited from class org.openide.cookies.InstanceCookie
InstanceCookie.Origin
 
Constructor Summary
InstanceSupport.Instance(Object obj)
          Create a new instance cookie.
 
Method Summary
 Class instanceClass()
          The representation type that may be created as instances.
 Object instanceCreate()
          Create an instance.
 String instanceName()
          The bean name for the instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceSupport.Instance

public InstanceSupport.Instance(Object obj)
Create a new instance cookie.
Parameters:
obj - the object to represent in this cookie
Method Detail

instanceName

public String instanceName()
Description copied from interface: InstanceCookie
The bean name for the instance.
Specified by:
instanceName in interface InstanceCookie
Following copied from interface: org.openide.cookies.InstanceCookie
Returns:
the name

instanceClass

public Class instanceClass()
Description copied from interface: InstanceCookie
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.
Specified by:
instanceClass in interface InstanceCookie
Following copied from interface: org.openide.cookies.InstanceCookie
Returns:
the representation class of the instance
Throws:
IOException - if an I/O error occurred
ClassNotFoundException - if a class was not found

instanceCreate

public Object instanceCreate()
Description copied from interface: InstanceCookie
Create an instance.
Specified by:
instanceCreate in interface InstanceCookie
Following copied from interface: org.openide.cookies.InstanceCookie
Returns:
the instance of type InstanceCookie.instanceClass()
Throws:
IOException - if an I/O error occured
ClassNotFoundException - if a class was not found


Built on February 22 2001.  |  Portions Copyright 1997-2000 Sun Microsystems, Inc. All rights reserved.