Here you can find the source of toList(AstNode... nodes)
public static final List<AstNode> toList(AstNode... nodes)
//package com.java2s; /*/*from w w w. j av a2 s . com*/ * 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.ArrayList; import java.util.List; import org.mozilla.javascript.ast.AstNode; public class Main { public static final List<AstNode> toList(AstNode... nodes) { List<AstNode> list = new ArrayList<AstNode>(); for (AstNode node : nodes) { list.add(node); } return list; } }