|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.doclets.internal.toolkit.util.Group
public class Group
Process and manage grouping of packages, as specified by "-group" option on the command line.
For example, if user has used -group option as -group "Core Packages" "java.*" -group "CORBA Packages" "org.omg.*", then the packages specified on the command line will be grouped according to their names starting with either "java." or "org.omg.". All the other packages which do not fall in the user given groups, are grouped in default group, named as either "Other Packages" or "Packages" depending upon if "-group" option used or not at all used respectively.
Also the packages are grouped according to the longest possible match of their names with the grouping information provided. For example, if there are two groups, like -group "Lang" "java.lang" and -group "Core" "java.*", will put the package java.lang in the group "Lang" and not in group "Core".
This code is not part of an API. It is implementation that is subject to change. Do not use it as an API
| Nested Class Summary | |
|---|---|
private static class |
Group.MapKeyComparator
Since we need to sort the keys in the reverse order(longest key first), the compare method in the implementing class is doing the reverse comparison. |
| Field Summary | |
|---|---|
private Configuration |
configuration
The global configuration information for this run. |
private java.util.List<java.lang.String> |
groupList
List of group names in the same order as given on the command line. |
private java.util.Map<java.lang.String,java.lang.String> |
pkgNameGroupMap
Map of non-regular expressions(possible package names) with the corresponding group name. |
private java.util.Map<java.lang.String,java.lang.String> |
regExpGroupMap
Map of regular expressions with the corresponding group name. |
private java.util.List<java.lang.String> |
sortedRegExpList
List of regular expressions sorted according to the length. |
| Constructor Summary | |
|---|---|
Group(Configuration configuration)
|
|
| Method Summary | |
|---|---|
boolean |
checkPackageGroups(java.lang.String groupname,
java.lang.String pkgNameFormList)
Depending upon the format of the package name provided in the "-group" option, generate two separate maps. |
(package private) boolean |
foundGroupFormat(java.util.Map<java.lang.String,?> map,
java.lang.String pkgFormat)
Search if the given map has given the package format. |
java.util.List<java.lang.String> |
getGroupList()
Return the list of groups, in the same order as specified on the command line. |
(package private) java.util.List<PackageDoc> |
getPkgList(java.util.Map<java.lang.String,java.util.List<PackageDoc>> map,
java.lang.String groupname)
For the given group name, return the package list, on which it is mapped. |
java.util.Map<java.lang.String,java.util.List<PackageDoc>> |
groupPackages(PackageDoc[] packages)
Group the packages according the grouping information provided on the command line. |
(package private) java.lang.String |
regExpGroupName(java.lang.String pkgName)
Search for package name in the sorted regular expression list, if found return the group name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.Map<java.lang.String,java.lang.String> regExpGroupMap
private java.util.List<java.lang.String> sortedRegExpList
private java.util.List<java.lang.String> groupList
private java.util.Map<java.lang.String,java.lang.String> pkgNameGroupMap
private final Configuration configuration
| Constructor Detail |
|---|
public Group(Configuration configuration)
| Method Detail |
|---|
public boolean checkPackageGroups(java.lang.String groupname,
java.lang.String pkgNameFormList)
groupname - The name of the group from -group option.pkgNameFormList - List of the package name formats.
boolean foundGroupFormat(java.util.Map<java.lang.String,?> map,
java.lang.String pkgFormat)
map - Map to be searched.pkgFormat - The pacakge format to search.
public java.util.Map<java.lang.String,java.util.List<PackageDoc>> groupPackages(PackageDoc[] packages)
packages - Packages specified on the command line.java.lang.String regExpGroupName(java.lang.String pkgName)
pkgName - Name of package to be found in the regular
expression list.
java.util.List<PackageDoc> getPkgList(java.util.Map<java.lang.String,java.util.List<PackageDoc>> map,
java.lang.String groupname)
map - Map to be searched for gorup name.groupname - Group name to search.public java.util.List<java.lang.String> getGroupList()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||