|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.Backend.Maps.ClassDepthMap
harpoon.Backend.Maps.DefaultClassDepthMap
public class DefaultClassDepthMap
A DefaultClassDepthMap computes class depth simply and
efficiently. It uses a ClassHierarchy object to enable it
to implement the maxDepth() method. It also caches
the depths it computes to avoid having to traverse the entire class
inheritance tree repeatedly.
| Constructor Summary | |
|---|---|
DefaultClassDepthMap(ClassHierarchy ch)
Creates a DefaultClassDepthMap using the given
ClassHierarchy to compute the maximum class depth. |
|
| Method Summary | |
|---|---|
int |
classDepth(HClass hc)
Return the nesting depth of the given class. |
int |
maxDepth()
Returns the maximum nesting depth of any class (dependent on a given context). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultClassDepthMap(ClassHierarchy ch)
DefaultClassDepthMap using the given
ClassHierarchy to compute the maximum class depth.
| Method Detail |
|---|
public int classDepth(HClass hc)
ClassDepthMap
classDepth in class ClassDepthMappublic int maxDepth()
ClassDepthMap
maxDepth in class ClassDepthMap
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||