The listener is an inner class of the View.
侦听器是View的内部类。
Make an inner class in the parent class, which is a test case.
在父类中建立一个内部类,这个内部类是个测试用例。
The event handling method of the inner class is shown in Listing 2.
内部类的事件处理方法如清单2 所示。
The MqttSimpleCallback interface is implemented with an inner class.
MqttSimpleCallback接口是使用内部类实现的。
I find that style difficult to read and test, so I created a named inner class.
我发现这种风格难于读取和测试,所以我创建了一个有名称的内部类。
Anonymous inner class are local inner classes that don't have a class name.
匿名内部类是局部的内部类,它没有名字。
The magnification itself is made by the MagnifiedIcon inner class (lines 95 through 113).
真正的放大工作是由 MagnifiedIcon这个内部类来做的(第95行到第113行)。
Instance initializers allow you to execute construction code for an anonymous inner class.
实例初始化器允许您为一个匿名内部类执行构造代码。
The recommended approach is to use static inner classes, if you must use an inner class at all.
推荐的做法是如果非要使用内部类的话,请使用静态内部类。
To change what our view displays, modify the default code for the ViewContentProvider inner class.
要更改视图显示,修改ViewContentProvider内部类的默认代码。
Sometimes you need to write a subclass (often as an inner class) in order to test protected methods.
有时需要编写一个子类(通常作为内部类)来测试protected 的方法。
Often this means the proxy will need to be an inner class of Person to have access to private fields.
这通常意味着代理需要是Person的一个内部类,以便能访问private字段。
The code in Listing 1 would be much neater if the anonymous class was placed separately as an inner class.
如果这个匿名类可被作为一个内部类单独放置,那么清单1中的代码将会简洁很多。
In this code, the inner class MyInputValidator is responsible for validating input into the acronym list.
在这段代码中,内部类MyInputValidator负责验证缩略词列表的输入。
An inner class is added to implement the MqttSimpleCallback interface, and the registration of that handler.
添加内部类以实现MqttSimpleCallback接口和回调处理程序的注册。
An inner class has been implemented for query (lines 31-44) to map returned the ResultSet object to the User object.
为查询实现了一个内部类(31 - 44行)以将ResultSet对象映射到User对象。
Otherwise, an inner class will be created to store that element's contents (see name, phone and salary in Listing 9).
否则,将创建一个内部类来存储此元素的内容(见清单9中的name、phone和salary)。
Here, the ActionListener implementation is defined in place, as an anonymous inner class, and directly attached to the button.
这里,ActionListener实现是适时定义的,它定义为一个匿名内部类,并直接附加到按钮上。
This restriction is lifted in Groovy; you can change the values of variables in a containing scope from within an anonymous inner class.
Groovy则消除了这种限制,在Groovy中,匿名内部类可以修改外部的变量值。
This is an improvement over having to write a class any time an anonymous inner class is needed and can help keep the code more self-documenting.
相比于每个匿名内部类都要对应一个类的做法来说,这种方式是个极大的改进,同时也使得代码的可读性更好。
You are returning an instance of JsonRecordWriter, an inner class that will get a line of data from Listing 3 and produce a line of data in Listing 4.
您正在返回一个JsonRecordWriter实例,这是一个内部类,用于从清单3获取数据并生成清单4中的一行数据。
This feature is richer than function Pointers because it allows the inner class instance to retain a reference to the environment in which it was created.
该特性比函数指针更强大,因为它允许内部类实例保持对创建它的环境的引用。
The only thing a class needs to be used this way is a default constructor (which allows you to create an anonymous inner class instance inheriting from your class).
惟一需要以这种方式使用一个类的是一个默认构造函数(它允许您创建继承自类的一个匿名内部类)。
The first set of enclosing braces delineates the construction of an anonymous inner class, and the second set delineates the instance initializer for the anonymous inner class.
第一组闭合括弧划定一个匿名内部类的构造,第二组划定匿名内部类的实例初始化语句块。
For example, the semantics of return, break, and this are different in a block of code than they are in a Runnable (or other inner class instance) that represents the same block of code.
比如,return、break和this在某一代码块中的语义与其在Runnable(或其他内部类实例)中同一代码块中的语义是不同的。
Declare an inner class, Collab that extends the RuntimeCollaborator abstract class, and implements the operations and attributes declared for the MBean in the MBean Descriptor (Figure 2).
声明内部类Collab,Collab继承了RuntimeCollaborator抽象类并实现了在MBean描述符中为MBean声明的操作和属性(图2)。
For each parameter that has a dependency on other parameters, add a PatternDependencyDelegate statement to the constructor of the parameter's dependency inner class (see Listing 3). In this case.
对于每个依赖于其他参数的参数而言,要为参数内部依赖类的构造函数增加PatternDependencyDelegate声明(参看列表3)。
Inner classes can refer to mutable instance fields if the inner-class expression occurs in an instance context, but this is not the same thing.
如果内部类表达式出现在某个实例上下文中的话,内部类可以引用可变的实例域instance field,但这不是同一回事。
Inner classes can refer to mutable instance fields if the inner-class expression occurs in an instance context, but this is not the same thing.
如果内部类表达式出现在某个实例上下文中的话,内部类可以引用可变的实例域instance field,但这不是同一回事。
应用推荐