Class UseSite


  • public final class UseSite
    extends org.revapi.Reference<JavaElement>
    Since:
    0.1
    Author:
    Lukas Krejci
    • Method Detail

      • isMovingToApi

        public boolean isMovingToApi()
        This checks if the type of the use causes the use site to be part of the API but it also checks that the site actually can cause the used type to be in the API. In particular, protected members of final classes cannot move to the API, because no outside caller can access those members.

        Implementation note: This can only be reliably used once the element forest is completely constructed. The first point when this is safe is during the element forest pruning. In particular, one cannot use this in TreeFilters because those are used during element forest construction.

        Returns:
        true if the use site moves the used type to the API, false otherwise.