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

pack-priv Class DependencyFinder

extends Object
Class Inheritance
Static Imports
com.sun.tools.jdeps.Module.*, .Analyzer.NOT_FOUND, java.util.stream.Collectors.*

Parses class files and finds dependences

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static interface

Field Summary

Modifier and TypeField and Description
private static DependencyFinder.Finder
private static DependencyFinder.Finder
private final JdepsConfiguration
private final JdepsFilter
private final Map<DependencyFinder.Finder, Deque<Archive>>
private final Map<Dependency.Location, Archive>
private final ExecutorService
private final Deque<FutureTask<Set<Dependency.Location>>>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv Map<Archive, Set<Archive>>
dependences()

Returns a map from an archive to its required archives

pack-priv Stream<Archive>
getDependences(Archive source)

Returns the modules of all dependencies found

pack-priv boolean
pack-priv Map<Dependency.Location, Archive>
pack-priv Archive
locationToArchive(Dependency.Location location)

Returns the location to archive map; or NOT_FOUND.

public Set<Dependency.Location>
parse(Stream<? extends Archive> archiveStream)

Parses all class files from the given archive stream and returns all target locations.

public Set<Dependency.Location>
parse(Archive archive, String name)

Parses the named class from the given archive and returns all target locations the named class references.

private Optional<FutureTask<Set<Dependency.Location>>>
private Set<Dependency.Location>
parse(Archive archive, DependencyFinder.Finder finder, String name)

public Set<Dependency.Location>
parseExportedAPIs(Stream<? extends Archive> archiveStream)

Parses the exported API class files from the given archive stream and returns all target locations.

public Set<Dependency.Location>
parseExportedAPIs(Archive archive, String name)

Parses the exported API of the named class from the given archive and returns all target locations the named class references.

pack-priv void
private Set<Dependency.Location>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

API_FINDERback to summary
private static DependencyFinder.Finder API_FINDER
CLASS_FINDERback to summary
private static DependencyFinder.Finder CLASS_FINDER
configurationback to summary
private final JdepsConfiguration configuration
filterback to summary
private final JdepsFilter filter
parsedArchivesback to summary
private final Map<DependencyFinder.Finder, Deque<Archive>> parsedArchives
parsedClassesback to summary
private final Map<Dependency.Location, Archive> parsedClasses
poolback to summary
private final ExecutorService pool
tasksback to summary
private final Deque<FutureTask<Set<Dependency.Location>>> tasks

Constructor Detail

DependencyFinderback to summary
pack-priv DependencyFinder(JdepsConfiguration configuration, JdepsFilter filter)

Method Detail

dependencesback to summary
pack-priv Map<Archive, Set<Archive>> dependences()

Returns a map from an archive to its required archives

getDependencesback to summary
pack-priv Stream<Archive> getDependences(Archive source)

Returns the modules of all dependencies found

isParsedback to summary
pack-priv boolean isParsed(Dependency.Location location)
locationToArchiveback to summary
pack-priv Map<Dependency.Location, Archive> locationToArchive()
locationToArchiveback to summary
pack-priv Archive locationToArchive(Dependency.Location location)

Returns the location to archive map; or NOT_FOUND. Location represents a parsed class.

parseback to summary
public Set<Dependency.Location> parse(Stream<? extends Archive> archiveStream)

Parses all class files from the given archive stream and returns all target locations.

parseback to summary
public Set<Dependency.Location> parse(Archive archive, String name)

Parses the named class from the given archive and returns all target locations the named class references.

parseback to summary
private Optional<FutureTask<Set<Dependency.Location>>> parse(Archive archive, DependencyFinder.Finder finder)
parseback to summary
private Set<Dependency.Location> parse(Archive archive, DependencyFinder.Finder finder, String name) throws IOException
parseExportedAPIsback to summary
public Set<Dependency.Location> parseExportedAPIs(Stream<? extends Archive> archiveStream)

Parses the exported API class files from the given archive stream and returns all target locations.

parseExportedAPIsback to summary
public Set<Dependency.Location> parseExportedAPIs(Archive archive, String name)

Parses the exported API of the named class from the given archive and returns all target locations the named class references.

shutdownback to summary
pack-priv void shutdown()
waitForTasksCompletedback to summary
private Set<Dependency.Location> waitForTasksCompleted()
com.sun.tools.jdeps back to summary

private Class DependencyFinder.Finder

extends Object
implements Finder, SourceFilter
Class Inheritance
All Implemented Interfaces
com.sun.tools.jdeps.DependencyFinder.SourceFilter, com.sun.tools.jdeps.Dependency.Finder

Field Summary

Modifier and TypeField and Description
private final boolean
private final Dependency.Finder

Constructor Summary

AccessConstructor and Description
pack-priv
Finder(boolean apiOnly)

Method Summary

Modifier and TypeMethod and Description
public boolean
public Iterable<? extends Dependency>
findDependencies(ClassModel classfile)

Implements com.sun.tools.jdeps.Dependency.Finder.findDependencies.

Find the immediate dependencies of a given class file.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

apiOnlyback to summary
private final boolean apiOnly
finderback to summary
private final Dependency.Finder finder

Constructor Detail

Finderback to summary
pack-priv Finder(boolean apiOnly)

Method Detail

acceptback to summary
public boolean accept(Archive archive, String cn, AccessFlags accessFlags)

Implements com.sun.tools.jdeps.DependencyFinder.SourceFilter.accept.

Annotations
@Override
findDependenciesback to summary
public Iterable<? extends Dependency> findDependencies(ClassModel classfile)

Implements com.sun.tools.jdeps.Dependency.Finder.findDependencies.

Doc from com.sun.tools.jdeps.Dependency.Finder.findDependencies.

Find the immediate dependencies of a given class file.

Annotations
@Override
com.sun.tools.jdeps back to summary

private Interface DependencyFinder.SourceFilter

Known Direct Implementers
com.sun.tools.jdeps.DependencyFinder.Finder

Method Summary

Modifier and TypeMethod and Description
public boolean
accept(Archive archive, String cn, AccessFlags accessFlags)

Method Detail

acceptback to summary
public boolean accept(Archive archive, String cn, AccessFlags accessFlags)