@OpenApiAll
public interface AnnotationTargetParentProvider
AnnotationManager
, annotations of parent targets are also included (recursively).
Implementations of this interface can define what is the parent target for some target object.
Each implementation has to be registered by calling AnnotationManager.addAnnotationParentTargetProvider(AnnotationTargetParentProvider)
.
AnnotationManager.getAnnotations(java.lang.Object)
is called for for a ClassView
symbol
then annotations whose Annotation.getTargetObject()
is the symbol's Class
element will also be included.AnnotationManager
,
Annotation
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.lang.Object target) |
void |
cleanup(Project closedProject)
Called after project is closed to clean any project specific caches
|
java.lang.Object |
getParent(java.lang.Object target)
This method is called each time annotations are requested for any target in
AnnotationManager and that happens constantly. |
Project |
getProject(java.lang.Object target)
Project for the custom target is required to clean up the added annotations when the project is closed
|
boolean accept(java.lang.Object target)
@CheckForNull java.lang.Object getParent(java.lang.Object target)
AnnotationManager
and that happens constantly.
So implementations of this method should be fast and avoid new object creation.HashSet
.target
- annotation targetProject getProject(java.lang.Object target)
void cleanup(Project closedProject)