.instance files are NetBeans parlance for a file which is actually standing in for an instance of an object. An instance file typically says what class it is an instance of via its class name - for example, com-foo-mymodule-MyObject.instance. A .instance file may represent any Java class with a default constructor, or which can be obtained by calling a static method on a class.

In NetBeans infrastructure, .instance files result in InstanceDataObject. InstanceDataObjects can supply InstanceCookies, which in turn instantiate the JavaBean?. So, code to actually get an instance of an object declared in the System Filesystem would look like:

 public static Object getTheObject (String pathInSystemFilesystem) {

    InstanceCookie ck =  DataObject.find (Repository.getDefault().

    return ck.instanceCreate();

Alternately, FolderLookup offers a convenient way to get all instances of objects in a folder:
FileObject f = Repository.getDefault().getDefaultFileSystem().

DataFolder fld = DataFolder.findFolder(f);
FolderLookup lkp = new FolderLookup (fld);

Lookup.Result res = lkp.lookup (
  new Lookup.Template(WhatISaidToPutHere.class));


Note that a default constructor is not required in an XML layer; you can also use a static method, using the following syntax:

<file name="ObjectTypes.instance">
  <attr name="instanceCreate" 
     methodvalue="org.netbeans.core.ui.UINodes.createObjectTypes" />

  <attr name="instanceClass" stringvalue="org.openide.nodes.Node" />

Part of the value of the second entry, instanceClass is that the system will not need to instantiate your object just to see if it matches the class Node.

Source: NetBeans FAQ