jdepend.framework
Class DependencyConstraint

java.lang.Object
  extended byjdepend.framework.DependencyConstraint

public class DependencyConstraint
extends java.lang.Object

The DependencyConstraint class is a constraint that tests collections of package dependencies.

Author:
Mike Clark, Clarkware Consulting, Inc.

Constructor Summary
DependencyConstraint()
          Constructs a DependencyConstraint instance.
 
Method Summary
 void addPackage(JavaPackage jPackage)
          Adds the specified Java package to the constraint.
 JavaPackage addPackage(java.lang.String packageName)
          Adds the specified Java package to the constraint, creating it if necessary.
 java.util.Collection getPackages()
          Returns the constraint packages.
 boolean match(java.util.Collection packages)
          Indicates whether the specified packages match the packages in this constraint.
protected  boolean matchPackage(JavaPackage expectedPackage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyConstraint

public DependencyConstraint()
Constructs a DependencyConstraint instance.

Method Detail

addPackage

public JavaPackage addPackage(java.lang.String packageName)
Adds the specified Java package to the constraint, creating it if necessary.

Parameters:
packageName - Java package name.
Returns:
Java package.

addPackage

public void addPackage(JavaPackage jPackage)
Adds the specified Java package to the constraint.

Parameters:
jPackage - Java package.

getPackages

public java.util.Collection getPackages()
Returns the constraint packages.

Returns:
Packages.

match

public boolean match(java.util.Collection packages)
Indicates whether the specified packages match the packages in this constraint.

Returns:
true if the packages match this constraint

matchPackage

protected boolean matchPackage(JavaPackage expectedPackage)


Copyright © 1999-2002 Clarkware Consulting, Inc. All Rights Reserved.