Package org.spongepowered.asm.mixin
Annotation Type Mixin
@Target(TYPE)
@Retention(CLASS)
public @interface Mixin
Decorator for mixin classes
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description intpriorityPriority for the mixin, relative to other mixins targetting the same classesbooleanremapjava.lang.String[]targetsSince specifying targets invalue()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<?>[]valueTarget class(es) for this mixin
-
Element Details
-
value
java.lang.Class<?>[] valueTarget class(es) for this mixin- Returns:
- classes this mixin targets
- Default:
- {}
-
targets
java.lang.String[] targetsSince specifying targets invalue()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.- Returns:
- protected or package-private classes this mixin targets
- Default:
- {}
-
priority
int priorityPriority for the mixin, relative to other mixins targetting the same classes- Returns:
- the mixin priority (relative to other mixins targetting the same class)
- Default:
- 1000
-
remap
boolean remapBy default, the annotation processor will attempt to locate an obfuscation mapping for allShadowandInjectannotated members since it is anticipated that in general the target of aMixinwill 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 settingremapto 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.- Returns:
- True to instruct the annotation processor to search for obfuscation mappings for this annotation (default true).
- Default:
- true
-