User Tools

Site Tools


tutorial:mixin_tips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:mixin_tips [2022/08/17 21:51] – Added WIP warning clomclemtutorial:mixin_tips [2022/08/17 22:20] – Fixed mistake clomclem
Line 1: Line 1:
-====== Mixin Tips (WIP) ====== 
- 
 FIXME //This page is currently being written, and may change at any time.// FIXME //This page is currently being written, and may change at any time.//
 +
 +====== Mixin Tips (WIP) ======
  
  
Line 35: Line 35:
  
  
-**3. Access the "thisinstance more easily**+**3. Access the ''this'' instance more easily**
  
 In mixin, if you want to access the "this" instance, you have to do a cast inside your mixin class: In mixin, if you want to access the "this" instance, you have to do a cast inside your mixin class:
Line 80: Line 80:
 </code> </code>
  
-The only caveat is that if you want to mixin into the inner class constructor, the first parameter must be of the type of the outer class (this is implicitly added by the compiler to allow the inner class to access private methods of the outer class):+The only caveat is that if you want to mixin into the inner class constructor, the first parameter must be of the type of the outer class (this is implicitly added by the compiler to allow the inner class to access instance methods of the outer class):
  
 <code java> <code java>
tutorial/mixin_tips.txt · Last modified: 2023/12/18 02:06 by solidblock