For Coin 8: this keyword for static methods
    Vimil Saju 
    vimilsaju at yahoo.com
       
    Tue Feb 22 09:47:31 PST 2011
    
    
  
Hi,
 It would be nice to have a 'this'
 keyword for static methods. For static methods 'this' refers
 to the class in which the static method is defined.
 
 In our code-base we have a lot of places where we
 initialize a logger for a class as follows
 public class MyApp {
    static Logger logger = Logger.getLogger(MyApp.class);
    ...
    ...
If we could refer to MyApp using the keyword 'this' then when copying this code to other classes there wouldn't be a need to remember to change the class passed to the getLogger method.
Thanks
Vimil
      
    
    
More information about the coin-dev
mailing list