public @interface OriginatingElement
This annotation should be used on any generated top-level class that either contains generated modules (or entry points) or contains annotations that will generate modules (or entry points).
Example: Suppose we have the following use of an annotation, MyAnnotation
.
class Outer {
static class Inner {
@MyAnnotation Foo foo;
}
}
If MyAnnotation
generates an entry point, it should be annotated as follows:
@OriginatingElement(topLevelClass = Outer.class)
@EntryPoint
@InstallIn(ApplicationComponent.class) {
...
}
Modifier and Type | Required Element and Description |
---|---|
java.lang.Class<?> |
topLevelClass
Returns the top-level class enclosing the originating element.
|