public class JavaPackage
extends java.lang.Object
JavaPackage
class represents a Java package.Constructor and Description |
---|
JavaPackage(java.lang.String name) |
JavaPackage(java.lang.String name,
int volatility) |
Modifier and Type | Method and Description |
---|---|
float |
abstractness() |
void |
addAfferent(JavaPackage jPackage)
Adds the specified Java package as an afferent of this package.
|
void |
addClass(JavaClass clazz) |
void |
addEfferent(JavaPackage jPackage) |
int |
afferentCoupling() |
boolean |
collectAllCycles(java.util.List list)
Collects all the packages participating in a package dependency cycle
which originates from this package.
|
boolean |
collectCycle(java.util.List list)
Collects the packages participating in the first package dependency cycle
detected which originates from this package.
|
boolean |
containsCycle() |
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 |
efferentCoupling() |
boolean |
equals(java.lang.Object other) |
int |
getAbstractClassCount() |
java.util.Collection |
getAfferents() |
int |
getClassCount() |
java.util.Collection |
getClasses() |
int |
getConcreteClassCount() |
java.util.Collection |
getEfferents() |
java.lang.String |
getName() |
int |
getVolatility() |
int |
hashCode() |
float |
instability() |
void |
setAfferents(java.util.Collection afferents) |
void |
setEfferents(java.util.Collection efferents) |
void |
setVolatility(int v) |
public JavaPackage(java.lang.String name)
public JavaPackage(java.lang.String name, int volatility)
public java.lang.String getName()
public int getVolatility()
public void setVolatility(int v)
v
- Volatility (0-1).public boolean containsCycle()
public boolean collectCycle(java.util.List list)
list
- Collecting object to be populated with the list of
JavaPackage instances in a cycle.true
if a cycle exist; false
otherwise.public boolean collectAllCycles(java.util.List list)
This is a more exhaustive search than that employed by
collectCycle
.
list
- Collecting object to be populated with the list of
JavaPackage instances in a cycle.true
if a cycle exist; false
otherwise.public void addClass(JavaClass clazz)
public java.util.Collection getClasses()
public int getClassCount()
public int getAbstractClassCount()
public int getConcreteClassCount()
public void dependsUpon(JavaPackage imported)
imported
- Java package.public void addAfferent(JavaPackage jPackage)
jPackage
- Java package.public java.util.Collection getAfferents()
public void setAfferents(java.util.Collection afferents)
public void addEfferent(JavaPackage jPackage)
public java.util.Collection getEfferents()
public void setEfferents(java.util.Collection efferents)
public int afferentCoupling()
public int efferentCoupling()
public float instability()
public float abstractness()
public float distance()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright ? 1999-2005 Clarkware Consulting, Inc.