< prev index next >

src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/Node.java

Print this page

        

@@ -139,13 +139,21 @@
      * @return node the node or its replacement after visitation, null if no further visitations are required
      */
     public abstract Node accept(NodeVisitor<? extends LexicalContext> visitor);
 
     @Override
-    public String toString() {
+    public final String toString() {
+        return toString(true);
+    }
+
+    /*
+     * Return String representation of this Node.
+     * @param includeTypeInfo include type information or not
+     */
+    public final String toString(final boolean includeTypeInfo) {
         final StringBuilder sb = new StringBuilder();
-        toString(sb);
+        toString(sb, includeTypeInfo);
         return sb.toString();
     }
 
     /**
      * String conversion helper. Fills a {@link StringBuilder} with the
< prev index next >