Package jdepend.framework
Class JavaPackage
java.lang.Object
jdepend.framework.JavaPackage
The
JavaPackage
class represents a Java package.- Author:
- Mike Clark, Clarkware Consulting, Inc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
void
addAfferent
(JavaPackage jPackage) Adds the specified Java package as an afferent of this package.void
void
addEfferent
(JavaPackage jPackage) int
boolean
collectAllCycles
(List list) Collects all the packages participating in a package dependency cycle which originates from this package.boolean
collectCycle
(List list) Collects the packages participating in the first package dependency cycle detected which originates from this package.boolean
void
dependsUpon
(JavaPackage imported) Adds the specified Java package as an efferent of this package and adds this package as an afferent of it.float
distance()
int
boolean
int
int
int
getName()
int
int
hashCode()
float
void
setAfferents
(Collection afferents) void
setEfferents
(Collection efferents) void
setVolatility
(int v) toString()
-
Constructor Details
-
JavaPackage
-
JavaPackage
-
-
Method Details
-
getName
-
getVolatility
public int getVolatility()- Returns:
- The package's volatility (0-1).
-
setVolatility
public void setVolatility(int v) - Parameters:
v
- Volatility (0-1).
-
containsCycle
public boolean containsCycle() -
collectCycle
Collects the packages participating in the first package dependency cycle detected which originates from this package.- Parameters:
list
- Collecting object to be populated with the list of JavaPackage instances in a cycle.- Returns:
true
if a cycle exist;false
otherwise.
-
collectAllCycles
Collects all the packages participating in a package dependency cycle which originates from this package.This is a more exhaustive search than that employed by
collectCycle
.- Parameters:
list
- Collecting object to be populated with the list of JavaPackage instances in a cycle.- Returns:
true
if a cycle exist;false
otherwise.
-
addClass
-
getClasses
-
getClassCount
public int getClassCount() -
getAbstractClassCount
public int getAbstractClassCount() -
getConcreteClassCount
public int getConcreteClassCount() -
dependsUpon
Adds the specified Java package as an efferent of this package and adds this package as an afferent of it.- Parameters:
imported
- Java package.
-
addAfferent
Adds the specified Java package as an afferent of this package.- Parameters:
jPackage
- Java package.
-
getAfferents
-
setAfferents
-
addEfferent
-
getEfferents
-
setEfferents
-
afferentCoupling
public int afferentCoupling()- Returns:
- The afferent coupling (Ca) of this package.
-
efferentCoupling
public int efferentCoupling()- Returns:
- The efferent coupling (Ce) of this package.
-
instability
public float instability()- Returns:
- Instability (0-1).
-
abstractness
public float abstractness()- Returns:
- The package's abstractness (0-1).
-
distance
public float distance()- Returns:
- The package's distance from the main sequence (D).
-
equals
-
hashCode
public int hashCode() -
toString
-