@Retention(value=RUNTIME) @Target(value=TYPE) public @interface MixinFor
Stereotypes instead. Using Mixins is very implicit and difficult to trace back;
it is often better to actually copy the target class, so you can directly add your annotations,
instead of working with mixins. You have been warned!
If you have a class that you don't control, e.g.:
public class ImportedClass {
...
}
And you need it to be annotated as @SomeAnnotation. Then you can write a mixin (the name is arbitrary):
@MixinFor(ImportedClass.class)
@SomeAnnotation
public class ImportedClassMixin {
...
}
After the Power Annotations have been resolved, the target class looks as if it had another annotation:
@SomeAnnotation
public class ImportedClass {
...
}
public abstract Class<?> value
Copyright © 2018–2022. All rights reserved.