Package org.spongepowered.asm.mixin
Annotation Type Mixin
-
@Documented @Retention(CLASS) @Target(TYPE) public @interface MixinTheMixinannotation can be applied on classes to mark them as a mixin. It's presence is however mostly used in order know what classes are targeted by the mixin, as the mixin itself is resolved through the mixin configIn order for this annotation to work, either
targets()orvalue()needs to be defined. If neither are defined, an exception is thrown while parsing the mixin. The micromixin implementation will thus not add the mixin.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description intpriorityThe relative priority of the mixin, which defines the order in which the mixin is applied.java.lang.String[]targetsThe fully qualified names of the target classes.java.lang.Class<?>[]valueTheClassinstances of the targeted classes.
-
-
-
-
targets
java.lang.String[] targets
The fully qualified names of the target classes. The spongeian implementation will warn iftargets()is used wherevalue()could be used instead, but the Micromixin implementation does not warn in such instances.Packages can both be separated with dots (e.g.
java.lang.Object) like is done in Java source code, or be separated with slashes (e.g.java/lang/Object). Inner classes are always separated with the dollar symbol (e.g.java/util/AbstractMap$SimpleImmutableEntry) - using dots instead is not permissible (note that it will cause the mixin to fail silently as technically a class within the specified package could be loaded - it is permissible for classes and packages to be named similarly).- Returns:
- The targeted classes.
- Default:
- {}
-
-
-
value
java.lang.Class<?>[] value
TheClassinstances of the targeted classes. If the class cannot be referenced (for example because they are package-private),targets()should be used instead.- Returns:
- The targeted classes.
- Default:
- {}
-
-