Well, I could add a new member field to the class and use that instead of a local variable.
是的,我可以在类中添加一个新的成员字段,并使用这个字段而不是局部变量。
To simplify this example, we'll just add a new class whose methods return some simple data.
为了简化这个示例,我们添加了一个新类,它的方法返回一些简单数据。
As long as all the test cases pass, I add the new unit test class to my unit test automation library, which gets run on every build.
只要通过所有的测试用例,我就将向单元测试自动库添加新的单元测试类,在每次构建时运行。
This class can create a new index or open an existing index and add documents to it.
这个类能创建一个新的索引或者打开一个已存在的索引并为该所引添加文档。
If you modularize crosscutting concerns, such as logging and transaction management, it becomes possible to add new features to your code without modifying each class individually.
如果对横切关注点(例如日志和事务管理)进行了模块化,那么不用修改每个单独的类,就可以向代码中添加新特性。
When I add new features to a class, each new member can see the other visible members, so the theoretical complexity increases.
在类中添加新特性时,每个新成员都能看到其他可见的成员,这增加了理论上的复杂性。
You can add new fields and operations to a visualized C++ class by using either the pop-up menu (Figure 23) or the pop-up action bar (Figure 24).
您可以通过使用这个弹出式菜单(图23)或者弹出式操作栏(图24),为可视化 C++类添加新的域和操作。
Both the new methods are shown in Listing 3. Add them to the mediation handler class.
这两个新方法都在清单3中给出。请将它们添加到该中介处理程序类中。
To add new methods to a particular class of type t, it only needs to define static methods that accept type t as the first parameter.
要向类型为t的特定类添加新方法,只需定义一个静态方法,它接受类型T作为第一个参数。
This extension will do nothing more than look for any keywords defined for this class, and use them to add a new documentation tag associated with the class in the source code.
本扩展仅仅搜寻为该类定义的关键字,然后使用它们,来添加与源代码中的类相关的新记录标签。
In the above example, you create a new class named MySession to add objects into a session.
在上面的示例中,您创建了一个名为MySession的新类,用来将对象添加到会话中。
The language includes a construct (a category) that allows the programmer to add new methods to an existing class; this is not a capability provided by UML.
这种语言包含一种结构(category),它允许程序员给一个已经存在的类添加新的方法;uml中则没有这种功能。
If you add a method, all JRuby has to do is generate a new anonymous class that includes the body of that method.
如果你添加了一个方法,则所有JRuby要做的事情就是生成一个新的匿名类,该类包含了这一方法的方法体。
Because this optimization is not generally applicable and because it requires the introduction of new member variables, it is best not to add it directly to the Rope class.
因为这种优化无法做到普遍适用,而且要求引入新的成员变量,所以最好不要直接将它添加到Rope类。
Using the push method of the Array class, you can add new objects to your data provider.
使用Array类的push方法可以将新对象添加到数据提供程序中。
Add an entry for the new plug-in class in struts-config.xml by either using Application Developer (Figure 2) or by or editing struts-config.xml manually and adding the lines in Listing 4 at the end.
在struts - config . xml中为新的插件类添加条目,既可以通过使用ApplicationDeveloper(图2)来实现,也可以通过手动编辑struts - config . xml并且在末端添加清单4中的那一行。
To create the JRubyInterpreter class, create a new source code file with an empty class skeleton and add the Interpreter interface to the definition.
要创建jrubyinterpreter类,需要先创建一个新的源代码文件,其中带有空的类骨架,再向此定义中添加Interpreter接口。
After you have added the new variables to your classes, add the handler code to the main method of the OGAdmin class.
向类添加了新变量后,请将处理程序代码添加到ogadmin类的main方法。
Open the MySQLDatabaseSystemUnitValidator class and add a new class attribute for the validator identifier to your source code (see Listing 8).
打开mysqldatabasesystemunitvalidator类,并为确认器标识符向源代码添加一个新的类属性(见于代码清单8)。
If this main application class is defined in the base project (Warsaw in this case), then we cannot add new web pages in the dependent applications (Global).
如果主应用类是在基项目(这里是Warsaw)里定义的,那依赖应用(Global)就不能添加新的Web页面了。
Using introduction, aspects can add new methods and variables to a class, declare that a class implements an interface, or convert checked to unchecked exceptions.
使用引入(Introduction),Aspect可以向类中添加新的方法和变量、声明一个类实现一个接口或将检查异常转换为未检查异常(unchecked exception)。
Before you move on, let's investigate what would be required if one wanted to add a new class and a new method to be made available to Ext.Direct.
继续下一步之前,我们来探讨一下,如果想添加Ext . Direct可以有效使用的新类和新方法时,还需要什么。
To add a new row to your table, you simply create an instance of your entity class, set the attributes, and tell the EntityManager to persist the new entity.
为了向您的表格添加一个新行,您只需创建一个实体类的实例,设置其属性,并更新类entitymanager以支持新实体。
You also have to make sure that the Access class knows about the new class, so we will add extra functionality there as well.
此外,你还要保证Access类知道这个新类,所以我们也要对Access类增加额外的功能。
Figure 8 (larger image) shows the result of dragging and dropping the term Health Status Date to add a new attribute to the Customer class.
图8(参见大图)展示了拖放术语HealthStatusDate来向customer类添加一个新属性的结果。
This required me to add a new table that included only the new attributes of the TenuredProfessor class.
这需要我添加一个只包括tenuredprofessor类的新属性的新表。
If it is a new session, we use the GroupInfo utility class to get the list of LDAP groups the logged-in user belongs to, add them to a vector, and finally store the vector in the session object.
如果它是个新会话,我们就用GroupInfo实用程序类来获取这个登录的用户所属的ldap组的列表,然后将它们添加到向量中,最后把这个向量存储在会话对象中。
In the Model Explorer, use Visualize to add them to a new diagram or the current class diagram.
在模型搜索器中,使用Visualize来将它们添加到一个新图或当前的类图中。
Click new to add a new interceptor, and fill in the class name attribute with the fully qualified name of your interceptor class.
单击new添加新的拦截器,并用拦截器类的完全限定名称来填写类名称属性。
Create a new class, mediation.handlers.MessageBodyFormatter, in the MediationHandlers project and add the required import statements (Listing 5).
在MediationHandlers项目中创建一个新类mediation . handlers . MessageBodyFor matter,并添加所需的导入语句(清单5)。
应用推荐