History log of /external/doclava/src/com/google/doclava/FederationTagger.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3a239ab80aca1632d0aefaff9c0318098c280da3 18-Nov-2017 Jeff Sharkey <jsharkey@android.com> Emit all APIs using Predicates.

Awhile back we wrote a mechanism to emit API based on a customizable
Predicate<MemberInfo> which would "filter" exactly what should be
included or excluded.

This change extends this mechanism to be used for all API emission,
specifically "current.txt" files. To accomplish this, we now have
two predicates: one for deciding if a member should be emitted
directly into the API being generated, and another to decide if a
member can be referenced indirectly as part of emitting another API.

For example, generating removed.txt, we only want to emit members
tagged with "@removed", but of course it's okay for those members to
reference a non-removed class like String, etc.

Rewrite ApiPredicate to be general enough to support various matching
requirements. Also search package hierarchy when deciding if a
member matches or not, since "@hide" is often defined at the package
level.

Only emit superclasses and interfaces that match our predicate. If
a superclass/interface doesn't match the predicate, walk further
up the family tree to look for any and all superclasses/interfaces
that do actually match our predicate. Consider this example:

public class StringBuilder extends AbstractStringBuilder {}
class AbstractStringBuilder implements Appendable {}

In this case, we want to say "StringBuilder implements Appendable",
because AbstractStringBuilder won't be emitted by our predicate.

For fields inherited from ancestors, if a field would have matched had
it been defined directly on the class being inspected, then clone that
field to make it match. For methods inherited from ancestors, don't
allow the class being inspected to pretend that their override is
hidden.

Split out eliding logic into a separate predicate that is applied
as one final step. Fix bug where we weren't emitting generics.

Test: manual inspection of API text files
Bug: 69505783
Change-Id: Ic7f349c6cb80853967308d2f871a0b029ead0096
/external/doclava/src/com/google/doclava/FederationTagger.java
bb3c3f1d4ca6dfc90ac68019b71d732a8455912d 12-Jun-2017 Alan Viverette <alanv@google.com> Add Doclava support for federated APIs not referenced from code

Previously, @link and @see could only be used to reference APIs that were
also referenced from code. Since the platform cannot reference Support
Library APIs from code, this limitation prevented federation.

Federated APIs are now registered in the global Converter and TypeInfos
may now lazily resolve their classes.

Bug: 36959367
Test: make docs
Change-Id: Ie0c0672dbd8bfe2837ec60bc7c7e49cf67c43236
/external/doclava/src/com/google/doclava/FederationTagger.java
8e8f96738e2a4e673db94a489ba2daf63807bb16 05-Jun-2017 Jeff Sharkey <jsharkey@android.com> Lint to verify @SystemApi permissions; more docs.

Most @SystemApi methods should be protected with system (or higher)
permissions, so verify that system service methods are annotated with
any relevant @RequiresPermission.

Auto-document new @SystemService annotation to guide developers on
how to obtain manager instances.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I57ae661241557970af4328ff21abec7629492c7c
/external/doclava/src/com/google/doclava/FederationTagger.java
9c584846aff32976d94246c7682a980346d12f44 25-Jun-2012 Jeff Hamilton <jham@android.com> Fix federation for @link

Change-Id: I1bee6d87df69f0f04324102e6324d0fc4aca3195
/external/doclava/src/com/google/doclava/FederationTagger.java
1e0d370c6a4c165cb8c74f53cb035e5521e0cd87 21-Jun-2012 Jeff Hamilton <jham@android.com> Port over r184 from SVN.

This adds the ability to specify the federation
API definition file locally.

Also fix a bug when parsing doubles and floats
found in 8.xml.

Change-Id: I435298444fcd0337407c09af446cf375d06adc51
/external/doclava/src/com/google/doclava/FederationTagger.java
920dbbbaca6aa578f3b26d89e99d12754c26ed60 05-Aug-2010 Ben Dodson <bjdodson@google.com> Initial import of Doclava project

Change-Id: Ia5ae56f1700fce98e0ae6954fa2df617ec0537bb
/external/doclava/src/com/google/doclava/FederationTagger.java