public final class ReferencesCount extends Object
Modifier and Type | Method and Description |
---|---|
static ReferencesCount |
get(ClasspathInfo cpInfo)
Creates a
ReferencesCount for source classpath represented by given
ClasspathInfo . |
static ReferencesCount |
get(URL root)
Creates a
ReferencesCount for source root. |
int |
getPackageReferenceCount(ElementHandle<? extends PackageElement> pkg)
Returns an estimate of a number of classes on given source path (source root) which are
using given package.
|
int |
getTypeReferenceCount(ElementHandle<? extends TypeElement> type)
Returns an estimate of a number of classes on given source path (source root) which are
using given type.
|
Iterable<? extends ElementHandle<? extends PackageElement>> |
getUsedPackages()
Returns all packages used by classes on given source path (source root).
|
Iterable<? extends ElementHandle<? extends TypeElement>> |
getUsedTypes()
Returns all types used by classes on given source path (source root).
|
public int getTypeReferenceCount(@NonNull ElementHandle<? extends TypeElement> type)
type
- the type type to find the usage frequency for.public int getPackageReferenceCount(@NonNull ElementHandle<? extends PackageElement> pkg)
pkg
- the package to find the usage frequency for.@NonNull public Iterable<? extends ElementHandle<? extends TypeElement>> getUsedTypes()
@NonNull public Iterable<? extends ElementHandle<? extends PackageElement>> getUsedPackages()
@NonNull public static ReferencesCount get(@NonNull ClasspathInfo cpInfo)
ReferencesCount
for source classpath represented by given
ClasspathInfo
.cpInfo
- the ClasspathInfo
to create ReferencesCount
for.ReferencesCount
@NonNull public static ReferencesCount get(@NonNull URL root)
ReferencesCount
for source root.root
- the root to create ReferencesCount
for.ReferencesCount