tutorial:accesswideners
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:accesswideners [2022/01/23 02:59] – Fix spelling from "descriptior" to "descriptor", and fixed capitalization of "classname" in the method description froyo | tutorial:accesswideners [2023/01/13 21:42] – [File format] clarified the 'named' part, I did not understand it at all when I first read it lightningtow | ||
---|---|---|---|
Line 3: | Line 3: | ||
Access wideners provide a way to loosen the access limits of classes, methods or fields. Access wideners are similar to the commonly known Access Transformers. | Access wideners provide a way to loosen the access limits of classes, methods or fields. Access wideners are similar to the commonly known Access Transformers. | ||
- | Access wideners | + | Access wideners |
- | There are currently | + | |
* Needing to access a (package) private class, especially for the purpose of shadowing or accessing a field or method in a mixin. | * Needing to access a (package) private class, especially for the purpose of shadowing or accessing a field or method in a mixin. | ||
* Being able to override final methods or subclass final classes. | * Being able to override final methods or subclass final classes. | ||
- | * Before you consider overriding final methods, try mixin injecting in final methods first! | ||
* If you want to subclass a class with only (package) private constructors, | * If you want to subclass a class with only (package) private constructors, | ||
Line 19: | Line 17: | ||
A specific file format is used to define the access changes included in your mod. To aid IDE's you should use the '' | A specific file format is used to define the access changes included in your mod. To aid IDE's you should use the '' | ||
- | The file must start with the following header, '' | + | The file must start with the following header. '' |
<code [enable_line_numbers=" | <code [enable_line_numbers=" | ||
Line 132: | Line 130: | ||
... | ... | ||
</ | </ | ||
+ | |||
+ | ===== Validating the file ===== | ||
+ | By default, accesswidener entries that don't exist are ignored. | ||
+ | On recent versions of Loom, you can run '' |
tutorial/accesswideners.txt · Last modified: 2024/06/09 05:33 by haykam