* @author max
*/
public class ModuleGroupingRule implements UsageGroupingRule {
public UsageGroup groupUsage(Usage usage) {
if (usage instanceof UsageInModule) {
UsageInModule usageInModule = (UsageInModule)usage;
Module module = usageInModule.getModule();
if (module != null) return new ModuleUsageGroup(module);
}
if (usage instanceof UsageInLibrary) {
UsageInLibrary usageInLibrary = (UsageInLibrary)usage;