public final class DefaultHandle extends Object implements Node.Handle
Node.Handle
.
When created by DefaultHandle.createHandle(org.openide.nodes.Node)
it
looks for the parent of the node and stores the node's name.
When DefaultHandle.getNode()
is then called, it tries to restore the
parent and then to walk down to the child.
Note that if most nodes use DefaultHandle
, this
may walk up to the root recursively. Otherwise, some other sort
of handle may provide the termination case.
Modifier and Type | Method and Description |
---|---|
static DefaultHandle |
createHandle(Node node)
Create a handle for a given node.
|
Node |
getNode()
Find the node.
|
String |
toString() |
public Node getNode() throws IOException
getNode
in interface Node.Handle
IOException
- if the parent cannot be recreatedNodeNotFoundException
- if the path is not valid (exception may be examined for details)public static DefaultHandle createHandle(Node node)
node
- the node to create a handler fornull
if a handle cannot be created