/** * @see IPackageFragment#getCompilationUnits() */ public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * @see IPackageFragment#getCompilationUnits() */ public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * @see IPackageFragment#getCompilationUnits() */ public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * @see IPackageFragment#getCompilationUnits() */ public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * @see IPackageFragment#getCompilationUnits() */ public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * @see IPackageFragment#getCompilationUnits() */ @Override public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * Returns a collection of all class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getAllClassFiles() */ public IClassFile[] getAllClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; }
/** * Returns a the collection of class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getClassFiles() */ public IClassFile[] getClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; } /**
/** * Returns a the collection of class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getClassFiles() */ public IClassFile[] getClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; } /**
/** * Returns a the collection of class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getClassFiles() */ public IClassFile[] getClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; } /**
/** * Returns a collection of all class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getAllClassFiles() */ @Override public IClassFile[] getAllClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; }
/** * Returns a the collection of class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getClassFiles() */ public IClassFile[] getClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; } /**
/** * Returns a collection of ordinary class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getOrdinaryClassFiles() */ @Override public IOrdinaryClassFile[] getOrdinaryClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_ORDINARY_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); for (Iterator iterator = list.iterator(); iterator.hasNext();) { if (iterator.next() instanceof ModularClassFile) iterator.remove(); } IOrdinaryClassFile[] array= new IOrdinaryClassFile[list.size()]; list.toArray(array); return array; } /**
/** * Returns a collection of ordinary class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getOrdinaryClassFiles() */ @Override public IOrdinaryClassFile[] getOrdinaryClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_ORDINARY_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); for (Iterator iterator = list.iterator(); iterator.hasNext();) { if (iterator.next() instanceof ModularClassFile) iterator.remove(); } IOrdinaryClassFile[] array= new IOrdinaryClassFile[list.size()]; list.toArray(array); return array; } /**
if (packFrag instanceof PackageFragment) { PackageFragment pf = (PackageFragment) packFrag; ArrayList<?> children = pf.getChildrenOfType(IJavaElement.COMPILATION_UNIT); for (Object object : children) { if (object instanceof CompilationUnit) { ArrayList<?> children2 = pf.getChildrenOfType(IJavaElement.CLASS_FILE); for (Object object : children2) { if (object instanceof ClassFile) {