private void buildDeprecatedAPIInfo ( ) { SortedSet < Element > rset = deprecatedMap . get ( DeprElementKind . REMOVAL ) ; SortedSet < ModuleElement > modules = configuration . modules ; SortedSet < Element > mset = deprecatedMap . get ( DeprElementKind . MODULE ) ; for ( Element me : modules ) { if ( utils . isDeprecatedForRemoval ( me ) ) { rset . add ( me ) ; } if ( utils . isDeprecated ( me ) ) { mset . add ( me ) ; } } SortedSet < PackageElement > packages = configuration . packages ; SortedSet < Element > pset = deprecatedMap . get ( DeprElementKind . PACKAGE ) ; for ( Element pe : packages ) { if ( utils . isDeprecatedForRemoval ( pe ) ) { rset . add ( pe ) ; } if ( utils . isDeprecated ( pe ) ) { pset . add ( pe ) ; } } for ( Element e : configuration . getIncludedTypeElements ( ) ) { TypeElement te = ( TypeElement ) e ; SortedSet < Element > eset ; if ( utils . isDeprecatedForRemoval ( e ) ) { rset . add ( e ) ; } if ( utils . isDeprecated ( e ) ) { switch ( e . getKind ( ) ) { case ANNOTATION_TYPE : eset = deprecatedMap . get ( DeprElementKind . ANNOTATION_TYPE ) ; eset . add ( e ) ; break ; case CLASS : if ( utils . isError ( te ) ) { eset = deprecatedMap . get ( DeprElementKind . ERROR ) ; } else if ( utils . isException ( te ) ) { eset = deprecatedMap . get ( DeprElementKind . EXCEPTION ) ; } else { eset = deprecatedMap . get ( DeprElementKind . CLASS ) ; } eset . add ( e ) ; break ; case INTERFACE : eset = deprecatedMap . get ( DeprElementKind . INTERFACE ) ; eset . add ( e ) ; break ; case ENUM : eset = deprecatedMap . get ( DeprElementKind . ENUM ) ; eset . add ( e ) ; break ; } } composeDeprecatedList ( rset , deprecatedMap . get ( DeprElementKind . FIELD ) , utils . getFields ( te ) ) ; composeDeprecatedList ( rset , deprecatedMap . get ( DeprElementKind . METHOD ) , utils . getMethods ( te ) ) ; composeDeprecatedList ( rset , deprecatedMap . get ( DeprElementKind . CONSTRUCTOR ) , utils . getConstructors ( te ) ) ; if ( utils . isEnum ( e ) ) { composeDeprecatedList ( rset , deprecatedMap . get ( DeprElementKind . ENUM_CONSTANT ) , utils . getEnumConstants ( te ) ) ; } if ( utils . isAnnotationType ( e ) ) { composeDeprecatedList ( rset , deprecatedMap . get ( DeprElementKind . ANNOTATION_TYPE_MEMBER ) , utils . getAnnotationMembers ( te ) ) ; } } }
Build the sorted list of all the deprecated APIs in this run . Build separate lists for deprecated modules packages classes constructors methods and fields .