|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.jjar.DependencyEngine
public class DependencyEngine
Simple class to figure out ordered dependency lists. Basic idea is that you load it with datum consisting of a set consisting of a package name and list of packages that it's dependent upon.
Then, you should be able to ask for the dependencies for any package placed in there.
will detect loops at 'runtime', not loadtime. Just punts when that happens
This thing isn't close to threadsafe :)
Constructor Summary | |
---|---|
DependencyEngine()
CTOR |
Method Summary | |
---|---|
void |
addProject(String project,
List dependencies)
|
void |
addProject(String project,
List dependencies,
Object cookie)
Adds a project and it's associated dependencies. |
List |
generateCookielist()
from previous use - generates a dependency list spanning the entire tree. |
List |
generateNamelist()
from previous use - generates a dependency list spanning the entire tree. |
List |
getDependencies(List packages)
Generates a dependency list for a set of packages. |
List |
getDependencies(List packages,
boolean excludeTarget)
Generates a dependency list for a set of packages where there is the option to exclude/include the target packages. |
List |
getDependencies(String pkg)
returns a list of dependencies for a given package with the target being excluded from the list. |
List |
getDependencies(String pkg,
boolean excludeTarget)
returns a list of dependencies for a given package allowing the exclusion/inclusion of the target package. |
void |
reset()
Reset the dependency engine, clear all entries and start from scratch. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DependencyEngine()
Method Detail |
---|
public void reset()
public List getDependencies(String pkg)
pkg
- package to get dependency list for
public List getDependencies(String pkg, boolean excludeTarget)
pkg
- package to get dependency list forexcludeTarget
- boolean to control exclusion of target package
public List getDependencies(List packages)
packages
- List of strings, each string is a package name
public List getDependencies(List packages, boolean excludeTarget)
packages
- List of strings, each string is a package nameexcludeTarget
- boolean to exclude target
public List generateNamelist() throws Exception
Exception
public List generateCookielist() throws Exception
Exception
public void addProject(String project, List dependencies) throws Exception
Exception
public void addProject(String project, List dependencies, Object cookie) throws Exception
project
- Name of project to adddependencies
- java.util.List of project dependencies
Exception
- in the even that it already has the project in the list
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |