Jarhell A lot of jars can contribute to (and mask) the logical package/class structure. Here’s how to make sense of the whole mess using Structure101.
1. View your project in the Logical hierarchy
2. Tag the classes or packages you’re interested in
3.  Switch to the Jar Hierarchy and see which jars contain tagged items.

Do this in reverse to figure out how code from specific jars maps to (and interacts with) other code in the logical structure.

Here is an example from the Jboss code-base.

In the Composition perspective, select the Package hierarchy, and tag the package org.jboss.security – a blue dot indicates the package is "tagged".

Taggedpackage

Stay in the Composition perspective, but switch to the Jar hierarchy. Any jars that contribute to org.jboss.security are tagged (with a blue dot).

Taggedjars1

Taggedjars2

The solid tag jboss-srp-client.jar and jboss-srp.jar indicate that all of the contents of the jar are tagged – i.e. are in the package org.jboss.security.  The faded blue dots indicate that only part of the jar is tagged – you can drill down to find out what other stuff is in the jar – in this case, contributions to the package org.jboss.crypto:

Jardrilldown

Working the other way, tag jboss-srp.jar and switch back to the Package hierarchy to see how the code in that jar contributes to the package structure:

Packagedrilldown

The dependency diagram shows how the classes in the tagged jar interacts with the rest of the package:

Classdiagram_1

There are times when understanding how different hierarchies relate can be just what the doctor ordered.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.