Class UseSite
java.lang.Object
org.revapi.Reference<JavaElement>
org.revapi.java.spi.UseSite
- Since:
- 0.1
- Author:
- Lukas Krejci
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The way the used class is used by the use site. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.revapi.Reference
equals, getElement, hashCode
-
Constructor Details
-
UseSite
-
-
Method Details
-
getType
- Overrides:
getType
in classorg.revapi.Reference<JavaElement>
-
isMovingToApi
public boolean isMovingToApi()This checks if thetype
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
TreeFilter
s because those are used during element forest construction.- Returns:
true
if the use site moves the used type to the API,false
otherwise.
-
toString
-