@Target(value=TYPE)
@Retention(value=CLASS)
public @interface Mixin
| Modifier and Type | Optional Element and Description |
|---|---|
int |
priority
Priority for the mixin, relative to other mixins targetting the same
classes
|
boolean |
remap
|
java.lang.String[] |
targets
Since specifying targets in
value() requires that the classes be
publicly visible, this property is provided to allow package-private,
anonymous innner, and private inner classes to be referenced. |
java.lang.Class<?>[] |
value
Target class(es) for this mixin
|
public abstract java.lang.Class<?>[] value
public abstract java.lang.String[] targets
value() requires that the classes be
publicly visible, this property is provided to allow package-private,
anonymous innner, and private inner classes to be referenced. Referencing
an otherwise public class using this property is an error condition and
will throw an exception at runtime. It is completely fine to specify both
public and private targets for the same mixin however.public abstract int priority
public abstract boolean remap
Shadow and
Inject annotated members
since it is anticipated that in general the target of a Mixin
will be an obfuscated class and all annotated members will need to be
added to the obfuscation table. However since it is possible to also
apply mixins to non-obfuscated targets it may be desirable to suppress
the compiler warnings which would otherwise be generated. This can be
done on an individual member basis by setting remap to
false on the individual annotations, or disabled for the entire
mixin by setting the value here to false. Doing so will cause
the annotation processor to skip all annotations in this mixin when
building the obfuscation table unless the individual annotation is
explicitly decorated with remap = true.