Here you can find the source of getFilesInPackage(IProgramElement packageNode)
public static List getFilesInPackage(IProgramElement packageNode)
//package com.java2s; /* ******************************************************************* * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. /* w w w .j a va2 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.ArrayList; import java.util.Iterator; import java.util.List; import org.aspectj.asm.IProgramElement; public class Main { /** * @return all of the AspectJ and Java source files in a package */ public static List getFilesInPackage(IProgramElement packageNode) { List packageContents; if (packageNode == null) { return null; } else { packageContents = packageNode.getChildren(); } List files = new ArrayList(); for (Iterator it = packageContents.iterator(); it.hasNext();) { IProgramElement packageItem = (IProgramElement) it.next(); if (packageItem.getKind() == IProgramElement.Kind.FILE_JAVA || packageItem.getKind() == IProgramElement.Kind.FILE_ASPECTJ) { files.add(packageItem); } } return files; } }