Package jdepend.swingui
Class PackageNode
java.lang.Object
jdepend.swingui.PackageNode
- Direct Known Subclasses:
AfferentNode,EfferentNode
The
PackageNode class defines the default behavior for tree
nodes representing Java packages.- Author:
- Mike Clark, Clarkware Consulting, Inc.
-
Constructor Summary
ConstructorsConstructorDescriptionPackageNode(PackageNode parent, JavaPackage jPackage) Constructs aPackageNodewith the specified package and its collection of dependent packages. -
Method Summary
Modifier and TypeMethodDescriptionReturns the child package nodes of this node.protected abstract CollectionReturns the collection of Java packages coupled to the package represented in this node.Returns the Java package represented in this node.Returns the parent of this package node.booleanisChild(JavaPackage jPackage) Indicates whether the specified package should be displayed as a child of this node.booleanisLeaf()Indicates whether this node is a leaf node.protected abstract PackageNodemakeNode(PackageNode parent, JavaPackage jPackage) Creates and returns aPackageNodewith the specified parent node and Java package.Returns the string representation of this node's metrics.toString()Returns the string representation of this node in it's current tree context.
-
Constructor Details
-
PackageNode
Constructs aPackageNodewith the specified package and its collection of dependent packages.- Parameters:
parent- Parent package node.jPackage- Java package.
-
-
Method Details
-
getPackage
Returns the Java package represented in this node.- Returns:
- Java package.
-
getParent
Returns the parent of this package node.- Returns:
- Parent package node.
-
isLeaf
public boolean isLeaf()Indicates whether this node is a leaf node.- Returns:
trueif this node is a leaf;falseotherwise.
-
makeNode
Creates and returns aPackageNodewith the specified parent node and Java package.- Parameters:
parent- Parent package node.jPackage- Java package.- Returns:
- A non-null
PackageNodeinvalid input: '<'/code.
-
getCoupledPackages
Returns the collection of Java packages coupled to the package represented in this node.- Returns:
- Collection of coupled packages.
-
isChild
Indicates whether the specified package should be displayed as a child of this node.- Parameters:
jPackage- Package to test.- Returns:
trueto display the package;falseotherwise.
-
getChildren
Returns the child package nodes of this node.- Returns:
- Collection of child package nodes.
-
toMetricsString
Returns the string representation of this node's metrics.- Returns:
- Metrics string.
-
toString
Returns the string representation of this node in it's current tree context.
-