Comparator factory methods.
| Modifier and Type | Class and Description |
|---|---|
| private abstract class | Comparators.
A general purpose comparator to sort Element entities, basically provides the building blocks for creating specific comparators for each use-case. |
| Modifier and Type | Field and Description |
|---|---|
| private Comparator | |
| private Comparator | |
| private Comparator | |
| private Comparator | |
| private Comparator | |
| private Comparator | |
| private Comparator | |
| private Comparator | |
| private Comparator | |
| private Comparator | |
| private final Utils |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Comparator | Returns: the comparatorReturns a comparator for all classes, that compares the simple names of the type element, if equal then the fully qualified names, and if equal again the names of the enclosing modules. |
| public Comparator | Returns: a comparator to sort classes and members for class useComparator for ClassUse presentations, and sorts as follows: 1. |
| public Comparator | |
| public Comparator | Returns: an element comparator for index file useReturns an |
| public String | Returns: the element's primary key for use in the index comparatoran element element)Returns the element's primary key for use in the index comparator. |
| public Comparator | Returns: the comparatorReturns a comparator for module elements, that simply compares the fully qualified names |
| public Comparator | Returns: the comparatorReturns a comparator for overrides and implements, used primarily on methods, compares the name first, then compares the simple names of the enclosing type element and the fully qualified name of the enclosing type element. |
| public Comparator | Returns: the comparatorReturns a comparator for packages, by comparing the fully qualified names, and if those are equal the names of the enclosing modules. |
| public Comparator | |
| public Comparator | Returns: the comparatorReturns a comparator for items listed on summary list pages (like deprecated or preview summary pages), by comparing the fully qualified names, and if those are equal the names of the enclosing modules. |
| public Comparator | Returns: the comparatorReturns a comparator that compares the fully qualified names of two type mirrors. |
| public Comparator | Returns: the comparatorReturns a comparator that compares the simple names of two type mirrors, or the fully qualified names if the simple names are equal. |
| allClassesComparator | back to summary |
|---|---|
| private Comparator<Element> allClassesComparator | |
| classUseComparator | back to summary |
|---|---|
| private Comparator<Element> classUseComparator | |
| indexUseComparator | back to summary |
|---|---|
| private Comparator<Element> indexUseComparator | |
| moduleComparator | back to summary |
|---|---|
| private Comparator<Element> moduleComparator | |
| overrideUseComparator | back to summary |
|---|---|
| private Comparator<Element> overrideUseComparator | |
| packageComparator | back to summary |
|---|---|
| private Comparator<Element> packageComparator | |
| serialFieldTreeComparator | back to summary |
|---|---|
| private Comparator<SerialFieldTree> serialFieldTreeComparator | |
| summaryComparator | back to summary |
|---|---|
| private Comparator<Element> summaryComparator | |
| typeMirrorClassUseComparator | back to summary |
|---|---|
| private Comparator<TypeMirror> typeMirrorClassUseComparator | |
| typeMirrorIndexUseComparator | back to summary |
|---|---|
| private Comparator<TypeMirror> typeMirrorIndexUseComparator | |
| utils | back to summary |
|---|---|
| private final Utils utils | |
| Comparators | back to summary |
|---|---|
| pack-priv Comparators(Utils utils) | |
| allClassesComparator | back to summary |
|---|---|
| public Comparator Returns a comparator for all classes, that compares the simple names of the type element, if equal then the fully qualified names, and if equal again the names of the enclosing modules.
| |
| classUseComparator | back to summary |
|---|---|
| public Comparator Comparator for ClassUse presentations, and sorts as follows: 1. member names 2. then fully qualified member names 3. then parameter types if applicable 4. the element kinds ie. package, class, interface etc. 5. finally the name of the enclosing modules
| |
| generalPurposeComparator | back to summary |
|---|---|
| public Comparator Returns a general purpose comparator.
| |
| indexElementComparator | back to summary |
|---|---|
| public Comparator Returns an
| |
| indexElementKey | back to summary |
|---|---|
| public String indexElementKey(Element element) Returns the element's primary key for use in the index comparator. This method can be used by other comparators which need to produce results that are consistent with the index comparator. | |
| moduleComparator | back to summary |
|---|---|
| public Comparator Returns a comparator for module elements, that simply compares the fully qualified names
| |
| overrideUseComparator | back to summary |
|---|---|
| public Comparator Returns a comparator for overrides and implements, used primarily on methods, compares the name first, then compares the simple names of the enclosing type element and the fully qualified name of the enclosing type element.
| |
| packageComparator | back to summary |
|---|---|
| public Comparator Returns a comparator for packages, by comparing the fully qualified names, and if those are equal the names of the enclosing modules.
| |
| serialFieldTreeComparator | back to summary |
|---|---|
| public Comparator Returns a comparator for
| |
| summaryComparator | back to summary |
|---|---|
| public Comparator Returns a comparator for items listed on summary list pages (like deprecated or preview summary pages), by comparing the fully qualified names, and if those are equal the names of the enclosing modules.
| |
| typeMirrorClassUseComparator | back to summary |
|---|---|
| public Comparator Returns a comparator that compares the fully qualified names of two type mirrors.
| |
| typeMirrorIndexUseComparator | back to summary |
|---|---|
| public Comparator Returns a comparator that compares the simple names of two type mirrors, or the fully qualified names if the simple names are equal.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected int | Returns: a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the secondthe first element e1, Element the second element e2)Compares the kinds of two elements. |
| protected int | Returns: a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.the first Element. e1, Element the first Element. e2)Compares the fully qualified names of the entities |
| protected int | Returns: a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the secondthe first element e1, Element the second element e2)Compares the name of the modules of two elements. |
| protected int | Returns: a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.the first Element. e1, Element the second Element. e2)Compares two Elements, typically the name of a method, field or constructor. |
| protected int | Returns: a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.the first parameter array. params1, List<? extends VariableElement> the first parameter array. params2)compares two parameter arrays by first comparing the length of the arrays, and then each Type of the parameter in the array. |
| protected int | Returns: a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the secondthe first element e1, Element the second element e2)Compares the parameter arrays of two elements if they both are executable. |
| protected final int | |
| private String | Returns: a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.The fully qualified names of the entities, used solely by the comparator. |
| private int | |
| pack-priv String | |
| private String | |
| pack-priv boolean |
| ElementComparator | back to summary |
|---|---|
| public ElementComparator() | |
| compareElementKinds | back to summary |
|---|---|
| protected int compareElementKinds(Element e1, Element e2) Compares the kinds of two elements. | |
| compareFullyQualifiedNames | back to summary |
|---|---|
| protected int compareFullyQualifiedNames(Element e1, Element e2) Compares the fully qualified names of the entities | |
| compareModuleNames | back to summary |
|---|---|
| protected int compareModuleNames(Element e1, Element e2) Compares the name of the modules of two elements. | |
| compareNames | back to summary |
|---|---|
| protected int compareNames(Element e1, Element e2) Compares two Elements, typically the name of a method, field or constructor. | |
| compareParameters | back to summary |
|---|---|
| protected int compareParameters(boolean caseSensitive, List<? extends VariableElement> params1, List<? extends VariableElement> params2) compares two parameter arrays by first comparing the length of the arrays, and then each Type of the parameter in the array.
| |
| compareParameters | back to summary |
|---|---|
| protected int compareParameters(Element e1, Element e2) Compares the parameter arrays of two elements if they both are executable. | |
| compareTypeParameters | back to summary |
|---|---|
| protected final int compareTypeParameters(Element e1, Element e2) | |
| getFullyQualifiedName | back to summary |
|---|---|
| private String getFullyQualifiedName(Element e) The fully qualified names of the entities, used solely by the comparator.
| |
| getKindIndex | back to summary |
|---|---|
| private int getKindIndex(Element e) | |
| getParametersAsString | back to summary |
|---|---|
| pack-priv String getParametersAsString(List<? extends VariableElement> params) | |
| getTypeCode | back to summary |
|---|---|
| private String getTypeCode(TypeMirror t) | |
| hasParameters | back to summary |
|---|---|
| pack-priv boolean hasParameters(Element e) | |