Here you can find the source of getPrototypeClazz(List
public static final String getPrototypeClazz(List<AstNode> nodes)
//package com.java2s; /*/*from w w w .jav a2 s. c o m*/ * 06/05/2014 * * Copyright (C) 2014 Robert Futrell * robert_futrell at users.sourceforge.net * http://fifesoft.com/rsyntaxtextarea * * This library is distributed under a modified BSD license. See the included * RSTALanguageSupport.License.txt file for details. */ import java.util.List; import org.mozilla.javascript.ast.AstNode; public class Main { public static final String getPrototypeClazz(List<AstNode> nodes) { return getPrototypeClazz(nodes, -1); } public static final String getPrototypeClazz(List<AstNode> nodes, int depth) { if (depth < 0) { depth = nodes.size(); } StringBuilder sb = new StringBuilder(); for (int i = 0; i < depth; i++) { // These are not always Names, can sometimes be KeywordLiterals... // I think that's only in the case of syntax errors? sb.append(nodes.get(i).toSource()); if (i < depth - 1) { sb.append('.'); } } return sb.toString(); } }