# HG changeset patch # User Doug Simon # Date 1409862797 -7200 # Node ID c25fcf343b4f96305e69e86d7f6efb671dd398bc # Parent 49b8c89327867bc18e88a74f7c725c9f1e37d8e5 improved javadoc for NodeClass.is() diff -r 49b8c8932786 -r c25fcf343b4f graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java Thu Sep 04 22:32:49 2014 +0200 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java Thu Sep 04 22:33:17 2014 +0200 @@ -340,7 +340,17 @@ } /** - * Determines if a given {@link Node} class is described by the {@link NodeClass} object. + * Determines if a given {@link Node} class is described by this {@link NodeClass} object. This + * is useful for doing an exact type test (as opposed to an instanceof test) on a node. For + * example: + * + *
+     *     if (node.getNodeClass().is(BeginNode.class)) { ... }
+     *
+     *     // Due to generated Node classes, the test below
+     *     // is *not* the same as the test above:
+     *     if (node.getClass() == BeginNode.class) { ... }
+     * 
* * @param nodeClass a {@linkplain GeneratedNode non-generated} {@link Node} class */