中国开发网: 论坛: 程序员情感CBD: 贴子 249946
品雪: 这个不算简单的
15.8.4 Qualified this
Any lexically enclosing instance can be referred to by explicitly qualifying the
keyword this.
Let C be the class denoted by ClassName. Let n be an integer such that C is the
nth lexically enclosing class of the class in which the qualified this expression
appears. The value of an expression of the form ClassName.this is the nth lexically
enclosing instance of this (§8.1.3). The type of the expression is C. It is a
compile-time error if the current class is not an inner class of class C or C itself.

spec里翻了好半天才找到

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录