@Override public Collection<String> getClassNames() {
return directory.accept(new ClassFileVisitor(true)).names;
}
@Override public List<String> getClassNamesForPackage(PackageSearchInfo info) {
IVirtualArtifact pkgdir = this.getPathedArtifact(info.getPackagePath());
List<String> classNames = new ArrayList<String>();
if (pkgdir instanceof IVirtualDirectory) {
Iterator<IVirtualArtifact> artifacts = ((IVirtualDirectory)pkgdir).getArtifacts();
while (artifacts.hasNext()) {
IVirtualArtifact artifact = artifacts.next();
if (ClassNameUtil.isClassSource( artifact.getName() )) {
IVirtualPath relative = directory.getRelativePath(artifact);
classNames.add( ClassNameUtil.toClassName(relative.toString("/")) );
}
}
}