Package org.spongepowered.asm.mixin
Annotation Type Unique
-
@Documented @Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface UniqueTheUniqueannotation guarantees, when applied to a class member, that the member it was applied on does not cause any modifications to class members of the target classes.When using micromixin-transformer, fields will always get renamed to a unique identifier, however this behaviour may be subject to change. If you wish to change the behaviour, please reach out to the micromixin-transformer maintainers.
When applied on methods, then the annotated method will be overlaid under the semantics of the Intrinsic annotation, that is it will overlay the method with the same name, but when a collision occurs, the method will instead be discarded (with the same semantics as
Shadow). HOWEVER, if the annotated method isprivateorprotected, then in case of a collision the annotated method will be renamed using a uniquely generated prefix.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleansilent
-
-
-
Element Detail
-
silent
boolean silent
If the member that was annotated withUniqueis a public method and a collision occurred which caused the member to be absorbed (using the same semantics asShadow), then a warning will be printed to the log unlesssilent()is set totrue.- Returns:
- True for the annotation to be silent, false otherwise.
- Default:
- false
-
-