APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.tools.jdeps

public Class Dependencies

extends Object
Class Inheritance
Imports
java.lang.classfile.*, java.lang.classfile.constantpool.*, java.lang.constant.ClassDesc, .MethodTypeDesc, java.lang.reflect.AccessFlag, java.util.*, java.util.concurrent.ConcurrentHashMap, java.util.regex.Pattern, com.sun.tools.jdeps.Dependency.Filter, .Dependency.Finder, .Dependency.Location

A framework for determining dependencies between class files. A finder is used to identify the dependencies of individual classes. Some finders may return subtypes of Dependency to further characterize the type of dependency, such as a dependency on a method within a class. A filter may be used to restrict the set of dependencies found by a finder. Dependencies that are found may be passed to a recorder so that the dependencies can be stored in a custom data structure.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
Dependencies.APIDependencyFinder

This class identifies class names in the signatures of classes, fields, and methods in a class.

pack-priv abstract static class
pack-priv static class
Dependencies.ClassDependencyFinder

This class identifies class names directly or indirectly in the constant pool.

public static class
Dependencies.ClassFileError

Thrown when an exception is found processing a class file.

public static class
Dependencies.ClassFileNotFoundException

Thrown when a class file cannot be found.

public static interface
Dependencies.ClassFileReader

Service provider interface to locate and read class files.

pack-priv static class
Dependencies.DefaultFilter

This class accepts all dependencies.

public static interface
Dependencies.Recorder

Service provide interface to handle results.

pack-priv static class
Dependencies.SimpleDependency

A dependency of one class on another.

pack-priv static class
Dependencies.SimpleLocation

A location identifying a class.

pack-priv static class
Dependencies.TargetPackageFilter

This class accepts those dependencies whose class name is in a given package.

pack-priv static class
Dependencies.TargetRegexFilter

This class accepts those dependencies whose target's class name matches a regular expression.

Field Summary

Modifier and TypeField and Description
private Dependency.Filter
private Dependency.Finder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Set<Dependency>

Returns:

the set of dependencies that were found
findAllDependencies
(Dependencies.ClassFileReader
a finder to locate class files
classFinder
,
Set<String>
the names of the root classes from which to begin searching
rootClassNames
,
boolean
whether or not to also search those classes named in any filtered dependencies that are found.
transitiveClosure
)

Find the dependencies of a class, using the current finder and filter.

public void
findAllDependencies(Dependencies.ClassFileReader
a finder to locate class files
classFinder
,
Set<String>
the names of the root classes from which to begin searching
rootClassNames
,
boolean
whether or not to also search those classes named in any filtered dependencies that are found.
transitiveClosure
,
Dependencies.Recorder
a recorder for handling the results
recorder
)

Find the dependencies of a class, using the current finder and filter.

public static Dependency.Finder

Returns:

an API finder
getAPIFinder
(int
the access of members to be checked
access
)

Get a finder used to locate the API dependencies for a class.

public static Dependency.Finder

Returns:

a Class dependency finder
getClassDependencyFinder
()

Get a finder to do class dependency analysis.

public static Dependency.Filter

Returns:

the default filter.
getDefaultFilter
()

Get the default filter used to determine included when searching the transitive closure of all the dependencies.

public static Dependency.Finder

Returns:

the default finder
getDefaultFinder
()

Get the default finder used to locate the dependencies for a class.

public Dependency.Filter

Returns:

the filter
getFilter
()

Get the filter used to determine the dependencies included when searching the transitive closure of all the dependencies.

public Dependency.Finder

Returns:

the finder
getFinder
()

Get the finder used to locate the dependencies for a class.

public static Dependency.Filter

Returns:

a filter for checking the target package name against a list of package names
getPackageFilter
(Set<String>
the package names used to match the target's class name
packageNames
,
boolean
whether or not to match subpackages as well
matchSubpackages
)

Get a filter which checks the package of a target's class name to determine if a dependency is of interest.

public static Dependency.Filter

Returns:

a filter for matching the target class name with a regular expression
getRegexFilter
(Pattern
the pattern used to match the target's class name
pattern
)

Get a filter which uses a regular expression on the target's class name to determine if a dependency is of interest.

public void
setFilter(Dependency.Filter
the filter
f
)

Set the filter used to determine the dependencies included when searching the transitive closure of all the dependencies.

public void
setFinder(Dependency.Finder
the finder
f
)

Set the finder used to locate the dependencies for a class.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait