tutorial:mixin_glossary
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:mixin_glossary [2025/11/29 03:49] – gauntrecluse | tutorial:mixin_glossary [2026/02/26 08:59] (current) – Added MixinSquared entry gauntrecluse | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | :!: // | + | :!: This page was recently pushed out of drafting, it may still contain errors or inaccuracies. Direct [[# |
| - | ====== Mixin Glossary | + | ====== Mixin Glossary ====== |
| - | ===== Preamble ===== | + | ===== About This Page ===== |
| - | + | ||
| - | This page aims to address terms, acronyms, abbreviations, | + | |
| - | It is advised to read the [[[[tutorial: | + | |
| - | + | ||
| - | ==== Contributing ==== | + | |
| - | + | ||
| - | Seeing as this page is likely to change a lot with time as terms, both official and common usage ones, may vary over time and need many amendments as both Mixin and associated libraries evolve and get used in different contexts; it feels wise to add a section on best practices for contributing to this page in the long run. | + | |
| - | + | ||
| - | If you wish to contribute it is appreciated to use references to external sources when relevant, preferably the [[https:// | + | |
| - | Due to the amount of potential areas that could be edited, it would also be appreciated to always specify which definitions you're adding or editing in your edit summary messages. If necessary, split your edit into different smaller edits to be able to more clearly indicate which definitions were modified. | + | |
| - | + | ||
| - | === Formatting and TODOs === | + | |
| - | + | ||
| - | When you are doubtful on a term's definition, add a %%FIXME%% above the relevant text with text in //italics// until a more confident definition can be found. Definitions should generally take the form of itemized lists with the term above the list's first items. Synonyms should be grouped together. Footnotes references describing the same resource and so on should use the **exact** same text so that they both redirect to the same footnote. | + | |
| - | + | ||
| - | TODO notes should always describe what should be added there and should ideally be in // | + | |
| - | + | ||
| - | Example definition: | + | |
| - | + | ||
| - | == Words! == | + | |
| - | - First def | + | |
| - | - Sub-def | + | |
| - | * Note on First def | + | |
| - | - Second def | + | |
| - | * Note on Second def | + | |
| - | + | ||
| - | === Referencing other definitions | + | |
| - | + | ||
| - | You can reference another definition on the page by referencing the definition' | + | |
| - | [[# | + | |
| - | [[#asm|The ASM definition]] - '' | + | |
| + | This page aims to address terms, acronyms, abbreviations, | ||
| + | It is advised to read the [[tutorial: | ||
| ---- | ---- | ||
| - | :!: //This is under heavy construction and probably contains inaccuracies, | ||
| ===== Definitions ===== | ===== Definitions ===== | ||
| Line 50: | Line 20: | ||
| == Anonymous Class == | == Anonymous Class == | ||
| - | - A nameless | + | - A nameless |
| == Enclosing Method == | == Enclosing Method == | ||
| - The method containing the relevant subject, such as an [[# | - The method containing the relevant subject, such as an [[# | ||
| + | |||
| == Encapsulating Class, Outer Class == | == Encapsulating Class, Outer Class == | ||
| - The class containing the relevant subject, often an inner class such as an [[# | - The class containing the relevant subject, often an inner class such as an [[# | ||
| + | |||
| + | |||
| + | == Composition == | ||
| + | - The action of wrapping an object, most often a lambda, into a bigger one of the same type. With mixins, this is often done instead of injecting at the head and/or tail of a lambda method. This avoids needing to inject into a lambda' | ||
| + | |||
| == Mixin, Mixin Class == | == Mixin, Mixin Class == | ||
| - When used as a single term in the form of a proper noun, references the Mixin Subsystem as a whole. Mixin is a subsystem with the primary purpose of allowing a developer to describe modifications to be made at runtime using code. See [[tutorial: | - When used as a single term in the form of a proper noun, references the Mixin Subsystem as a whole. Mixin is a subsystem with the primary purpose of allowing a developer to describe modifications to be made at runtime using code. See [[tutorial: | ||
| - | - "a Mixin" or "a Mixin Class" refers to classes or interfaces that are annotated with '' | + | - "a Mixin" or "a Mixin Class" refers to classes or interfaces that are annotated with '' |
| == Target Class == | == Target Class == | ||
| - | - A class with contents being targeted by the relevant | + | - A class which a [[# |
| == Target Method == | == Target Method == | ||
| - | - A method within a [[# | + | - A method within a [[# |
| == Merging, to merge == | == Merging, to merge == | ||
| - | - In the context of Mixin, | + | - In the context of Mixin, |
| Line 80: | Line 56: | ||
| == Double-Casting == | == Double-Casting == | ||
| - | - For Mixins, references the practice of casting a '' | + | - The practice of casting a '' |
| == Accessor == | == Accessor == | ||
| - | - Reference to an [[tutorial: | + | - Reference to an [[tutorial: |
| - Reference to the '' | - Reference to the '' | ||
| == Invoker == | == Invoker == | ||
| - Reference to the '' | - Reference to the '' | ||
| - | |||
| Line 95: | Line 70: | ||
| - A companion library for the Mixin subsystem. MixinExtras focuses on giving more versatile, precise and compatible injectors and general Mixin usage utility. MixinExtras is bundled with Fabric since Loader version 0.15; MixinExtras 0.5.0 has been bundled with Fabric since Loader version 0.17.0; See [[https:// | - A companion library for the Mixin subsystem. MixinExtras focuses on giving more versatile, precise and compatible injectors and general Mixin usage utility. MixinExtras is bundled with Fabric since Loader version 0.15; MixinExtras 0.5.0 has been bundled with Fabric since Loader version 0.17.0; See [[https:// | ||
| + | |||
| + | == MixinSquared == | ||
| + | - A specialized library for Mixin. MixinSquared focuses on providing ways to modify other mods' mixin classes and potentially cancel them. It must be included by individual mods, as it is not bundled in Fabric Loader. MixinSquared should only be used when it is not reasonable or feasible to integrate the changes into a target mod directly, such as with a pull request or raising an issue. | ||
| + | * See the [[https:// | ||
| == To mix into, to Mixin to == | == To mix into, to Mixin to == | ||
| Line 112: | Line 91: | ||
| ==== Bytecode ===== | ==== Bytecode ===== | ||
| + | |||
| + | For a more thorough look at JVM Bytecode, see [[https:// | ||
| == As opposed to Source code == | == As opposed to Source code == | ||
| - Bytecode is a set of less readable, computer-oriented instructions, | - Bytecode is a set of less readable, computer-oriented instructions, | ||
| - | |||
| - | ---- | ||
| == Signatures == | == Signatures == | ||
| Line 134: | Line 113: | ||
| | I | int | | | I | int | | ||
| | J | long | | | J | long | | ||
| - | | L ClassName ; | Named class or interface type | | + | | L ClassName ; | Named class or interface type | |
| | S | short | | | S | short | | ||
| | Z | boolean | | | Z | boolean | | ||
| Line 145: | Line 124: | ||
| == Synthetic members/ | == Synthetic members/ | ||
| - In Java, synthetic members and constructs refers to constructs added by the Java compiler into the compiled bytecode that do not have a source code equivalent. For instance, an anonymous class is given synthetic '' | - In Java, synthetic members and constructs refers to constructs added by the Java compiler into the compiled bytecode that do not have a source code equivalent. For instance, an anonymous class is given synthetic '' | ||
| - | * Synthetic members may be targeted by Mixin, such as with '' | + | * Synthetic members may be targeted by mixins, but often require reading the bytecode. |
| ---- | ---- | ||
| Line 161: | Line 140: | ||
| == Callback == | == Callback == | ||
| - | - A series of injected instructions invoking the associated handler method based on that method' | + | - A series of injected instructions invoking the associated handler method based on that method' |
| Line 215: | Line 194: | ||
| - '' | - '' | ||
| * See the [[https:// | * See the [[https:// | ||
| - | |||
| ---- | ---- | ||
| Line 224: | Line 202: | ||
| == Brittle == | == Brittle == | ||
| - | - A " | + | - A " |
| Line 232: | Line 210: | ||
| == Expressions == | == Expressions == | ||
| - | - Added in MixinExtras '' | + | - Added in MixinExtras '' |
| - | - To "use an expression" | + | |
| * See [[https:// | * See [[https:// | ||
| + | |||
| == MixinExtras Flowchart == | == MixinExtras Flowchart == | ||
| - | - An IDE feature added by the [# | + | - An IDE feature added by the [[# |
| == @Definition == | == @Definition == | ||
| - In the context of [[# | - In the context of [[# | ||
| + | |||
| == Wildcard == | == Wildcard == | ||
| Line 249: | Line 229: | ||
| - A discriminator which, between all valid targets once other filters and discriminators are applied, uses a zero-indexed value to select one of the remaining targets for the injector to target. | - A discriminator which, between all valid targets once other filters and discriminators are applied, uses a zero-indexed value to select one of the remaining targets for the injector to target. | ||
| * Ordinals are generally a more [[# | * Ordinals are generally a more [[# | ||
| + | |||
| + | |||
| + | |||
| + | ===== Contributing ===== | ||
| + | |||
| + | Seeing as this page is likely to change a lot with time as terms, both official and common usage ones, may vary over time and need many amendments as both Mixin and associated libraries evolve and get used in different contexts; it feels wise to add a section on best practices for contributing to this page in the long run. | ||
| + | |||
| + | If you wish to contribute it is appreciated to use references to external sources when relevant, preferably the [[https:// | ||
| + | Due to the amount of potential areas that could be edited, it would also be appreciated to always specify which definitions you're adding or editing in your edit summary messages. If necessary, split your edit into different smaller edits to be able to more clearly indicate which definitions were modified. | ||
| + | |||
| + | === Formatting and TODOs === | ||
| + | |||
| + | When you are doubtful on a term's definition, add a %%FIXME%% above the relevant text with text in //italics// until a more confident definition can be found. Definitions should generally take the form of itemized lists with the term above the list's first items. Synonyms should be grouped together. Footnotes references describing the same resource and so on should use the **exact** same text so that they both redirect to the same footnote. | ||
| + | |||
| + | TODO notes should always describe what should be added there and should ideally be in //italics// | ||
| + | |||
| + | Example definition: | ||
| + | |||
| + | == Words! == | ||
| + | - First def | ||
| + | - Sub-def | ||
| + | * Note on First def | ||
| + | - Second def | ||
| + | * Note on Second def | ||
| + | |||
| + | === Referencing other definitions === | ||
| + | |||
| + | You can reference another definition on the page by referencing the definition' | ||
| + | [[# | ||
| + | [[#asm|The ASM definition]] - '' | ||
tutorial/mixin_glossary.1764388185.txt.gz · Last modified: 2025/11/29 03:49 by gauntrecluse