tutorial:mixin_injects
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:mixin_injects [2020/02/07 01:45] – clean up example draylar | tutorial:mixin_injects [2020/02/07 01:58] – draylar | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | Injects allows you to place custom code at a specified position inside an existing method. For a functional | + | Injects allows you to place custom code at a specified position inside an existing method. For a working |
<code java> | <code java> | ||
Line 24: | Line 24: | ||
=== Returning & Cancelling from Inject === | === Returning & Cancelling from Inject === | ||
- | To cancel or return early inside a method, use '' | + | To cancel or return early inside a method, use '' |
<code java> | <code java> | ||
@Inject(method = " | @Inject(method = " | ||
</ | </ | ||
+ | |||
+ | |||
+ | === Injecting into Constructors === | ||
+ | To inject into a constructor, | ||
===== Practical Example ===== | ===== Practical Example ===== |
tutorial/mixin_injects.txt · Last modified: 2022/08/05 19:19 by clomclem