Changes

819 bytes added ,  02:56, 13 August 2021
add note about wildcard ATs
Line 133: Line 133:  
| <code>V</code> || <code>void</code> || a void or no-value return type; only available for the return type of a method descriptor
 
| <code>V</code> || <code>void</code> || a void or no-value return type; only available for the return type of a method descriptor
 
|}
 
|}
 +
 +
{{Tip/Danger
 +
|title=Wildcard access transformers
 +
|A special type of access transformers called '''wildcard ATs''' (oftentimes referred to as '''shotgun ATs''' allows transforming the access modifier and finality of ''all'' fields or methods within a class.
 +
 +
To use wildcard access transformers:
 +
* for all methods within a class: <code>''<modifier>'' ''<class name>'' '''*'''</code>
 +
* for all fields within a class: <code>''<modifier>'' ''<class name>'' '''*()'''</code>
 +
 +
'''Modders should avoid using this in live code.''' Access transformers should always have the fewest and narrowest targets possible, and wildcard ATs violate this convention. Use of wildcard ATs may cause problems with both the ForgeGradle setup process. Wildcard ATs may be removed in a future update of the access transformer specification.
 +
}}
    
== Examples ==
 
== Examples ==
297

edits