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.
为了简化这个示例,我们添加了一个新类,它的方法返回一些简单数据。
Once you add a new controller class or method, it becomes automatically available.
在添加新控制器类或方法之后,它们就自动变为可用的了。
This returns a new empty class to which I can add attributes.
它返回一个新的空类,我能向此空类添加属性。
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作为第一个参数。
The modeler can add new attributes to an existing class.
建模师可以向现有类添加新属性。
Add the contents shown in Listing 5 into your new class.
在新类中添加清单5所示的内容。
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.
本扩展仅仅搜寻为该类定义的关键字,然后使用它们,来添加与源代码中的类相关的新记录标签。
Then, we could add the necessary code to our new class to support "wings."
然后,我们将给新类添加必要的代码以支持它拥有“羽翼”这一特性。
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要做的事情就是生成一个新的匿名类,该类包含了这一方法的方法体。
Add a new class to the project. Accept the default name "Class1.cs".
添加一个新类到项目中,使用默认的名称“Class1 . cs ”。
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)。
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)。
The easiest way to add this class is to use File > New > Class wizard.
添加这个类的最简便方法是使用File >New >Class 向导。
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类添加一个新属性的结果。
应用推荐