FileDocCategorySizeDatePackage
ClassPathPackageInfo.javaAPI DocAndroid 1.5 API2539Wed May 06 22:42:02 BST 2009android.test

ClassPathPackageInfo

public class ClassPathPackageInfo extends Object
The Package object doesn't allow you to iterate over the contained classes and subpackages of that package. This is a version that does. {@hide} Not needed for 1.0 SDK.

Fields Summary
private final ClassPathPackageInfoSource
source
private final String
packageName
private final Set
subpackageNames
private final Set
topLevelClasses
Constructors Summary
ClassPathPackageInfo(ClassPathPackageInfoSource source, String packageName, Set subpackageNames, Set topLevelClasses)

        this.source = source;
        this.packageName = packageName;
        this.subpackageNames = Collections.unmodifiableSet(subpackageNames);
        this.topLevelClasses = Collections.unmodifiableSet(topLevelClasses);
    
Methods Summary
private voidaddTopLevelClassesTo(java.util.Set set)

        set.addAll(topLevelClasses);
        for (ClassPathPackageInfo info : getSubpackages()) {
            info.addTopLevelClassesTo(set);
        }
    
public booleanequals(java.lang.Object obj)

        if (obj instanceof ClassPathPackageInfo) {
            ClassPathPackageInfo that = (ClassPathPackageInfo) obj;
            return (this.packageName).equals(that.packageName);
        }
        return false;
    
public java.util.SetgetSubpackages()

        Set<ClassPathPackageInfo> info = Sets.newHashSet();
        for (String name : subpackageNames) {
            info.add(source.getPackageInfo(name));
        }
        return info;
    
public java.util.SetgetTopLevelClassesRecursive()

        Set<Class<?>> set = Sets.newHashSet();
        addTopLevelClassesTo(set);
        return set;
    
public inthashCode()

        return packageName.hashCode();