Here you can find the source of getPackagesHelper(IProgramElement node, IProgramElement.Kind kind, String prename, List matches)
private static List getPackagesHelper(IProgramElement node, IProgramElement.Kind kind, String prename, List matches)
//package com.java2s; /* ******************************************************************* * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. /*from w w w .j av a2 s .com*/ * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Xerox/PARC initial implementation * ******************************************************************/ import java.util.Iterator; import java.util.List; import org.aspectj.asm.IProgramElement; public class Main { private static List getPackagesHelper(IProgramElement node, IProgramElement.Kind kind, String prename, List matches) { if (kind == null || node.getKind().equals(kind)) { if (prename == null) { prename = new String(node.toString()); } else { prename = new String(prename + "." + node); } Object[] o = new Object[2]; o[0] = node; o[1] = prename; matches.add(o); } for (Iterator it = node.getChildren().iterator(); it.hasNext();) { IProgramElement nextNode = (IProgramElement) it.next(); getPackagesHelper(nextNode, kind, prename, matches); } return matches; } }