Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.jdeveloper.model
Class DependencyCache

java.lang.Object
  extended by oracle.jdeveloper.model.DependencyCache

public final class DependencyCache
extends java.lang.Object

Caches the dependencies between all the projects in an Application.

This is useful when you want to find downstream dependencies - that is, projects that depend on a given project. To do so, you need to look at the dependencies of all the projects in the Application to see which ones depend on the project in question. This can take some time, so this class improves performance by caching the results. The cache is updated whenever dependencies are changed, or a project is added to or removed from the Application. Currently, the cache is stored in memory and not persisted to disk. So the cache must be rebuilt every time JDeveloper is restarted.

Note that calling this class could cause the dependency cache to be built. Therefore, this class should not be used on the UI event thread, as this would block the UI while the cache is built.


Method Summary
 java.util.Collection<Project> getDownstreamProjects(Project project)
          Get the downstream projects that directly depend on the given project.
static DependencyCache getInstance(Context context)
          Get the DependencyCache for the given context.
 java.util.Collection<Project> getProjectsUsing(Context context, java.lang.String... fqClassNames)
          Uses dependency information to determine which projects in the Application could refer to one or more of the Java classes with the given fully qualified names.
 java.util.Collection<Project> getUpstreamProjects(Project project)
          Get the upstream projects that the given project directly depends on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DependencyCache getInstance(Context context)
Get the DependencyCache for the given context.

Parameters:
context - the context
Returns:
the DependencyCache

getUpstreamProjects

public java.util.Collection<Project> getUpstreamProjects(Project project)
                                                  throws java.lang.InterruptedException
Get the upstream projects that the given project directly depends on.

Parameters:
project - the project
Returns:
the upstream projects
Throws:
java.lang.InterruptedException - if the calling thread is interrupted

getDownstreamProjects

public java.util.Collection<Project> getDownstreamProjects(Project project)
                                                    throws java.lang.InterruptedException
Get the downstream projects that directly depend on the given project.

Parameters:
project - the project
Returns:
the downstream projects
Throws:
java.lang.InterruptedException - if the calling thread is interrupted

getProjectsUsing

public java.util.Collection<Project> getProjectsUsing(Context context,
                                                      java.lang.String... fqClassNames)
                                               throws java.lang.InterruptedException
Uses dependency information to determine which projects in the Application could refer to one or more of the Java classes with the given fully qualified names.

Parameters:
context - the IDE context
fqClassNames - the fully qualified class names
Returns:
the projects using one or more of these classes
Throws:
java.lang.InterruptedException - if the calling thread is interrupted

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.