code_junkie

keyword for the outer class from an anonymous inner class?

Nov 10th, 2011
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. public class a{
  2.  
  3. public void otherMethod(){}
  4. public void doStuff(String str, InnerClass b){}
  5. pubic void method(a){
  6.  
  7. doStuff("asd",
  8. new InnerClass(){
  9. public void innerMethod(){
  10. otherMethod();
  11. }
  12. }
  13. );
  14. }
  15.  
  16. }
  17.  
  18. OuterClassName.this.outerClassMethod();
Add Comment
Please, Sign In to add comment