...结处理的类中,而是把终结函数放在一个匿名的类(见第22条)中,该匿名类的唯一用途就是终结它的外围实例(enclosing instance)。该匿名类的单个实例被称为终结函数守卫者(finalizer guardian),外围类的每个实例都会创建这样一个守卫者。
基于112个网页-相关网页
...izer,应该放在finally里,以确保子类finalize时出异常时,父类finalizer仍被调用利用匿名类,终结外围实体(enclosing instance),外围实体在一个private instance中存储一个reference,指向终结函数守卫者(finalizer guardian),于是,finalizer guardian在外...
基于18个网页-相关网页
This refactoring will ask you to provide a name for the enclosing instance.
这种重构要求您为装入实例提供一个名字。
To preserve this functionality, the refactoring will add an instance of the enclosing class BagExample to the formerly nested class.
为了保留这种功能,重构过程将一个装入类 BagExample 的实例放在前面那个嵌套类中。
Referring to enclosing type parameters inside static methods and static inner classes is prohibited outright by the compiler. So, for instance, the following code is illegal in tiger.
编译器完全禁止在静态方法和静态内部类中引用封闭类型参数。
应用推荐