To simplify this example, we'll just add a new class whose methods return some simple data.
为了简化这个示例,我们添加了一个新类,它的方法返回一些简单数据。
Open the MySQLDatabaseSystemUnitValidator class and add a new class attribute for the validator identifier to your source code (see Listing 8).
打开mysqldatabasesystemunitvalidator类,并为确认器标识符向源代码添加一个新的类属性(见于代码清单8)。
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可以有效使用的新类和新方法时,还需要什么。
Or worse, imagine that you're writing a program, and as you're building it you add a new class to your library that conflicts with the name of an existing class.
或者更糟,假设我们准备写一个程序,但在创建它的时候,却向自己的库加入了一个新类,它与现有某个类的名字发生了冲突。
Well, I could add a new member field to the class and use that instead of a local variable.
是的,我可以在类中添加一个新的成员字段,并使用这个字段而不是局部变量。
This class can create a new index or open an existing index and add documents to it.
这个类能创建一个新的索引或者打开一个已存在的索引并为该所引添加文档。
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++类添加新的域和操作。
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.
本扩展仅仅搜寻为该类定义的关键字,然后使用它们,来添加与源代码中的类相关的新记录标签。
If you add a method, all JRuby has to do is generate a new anonymous class that includes the body of that method.
如果你添加了一个方法,则所有JRuby要做的事情就是生成一个新的匿名类,该类包含了这一方法的方法体。
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接口。
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以支持新实体。
This required me to add a new table that included only the new attributes of the TenuredProfessor class.
这需要我添加一个只包括tenuredprofessor类的新属性的新表。
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类添加一个新属性的结果。
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)。
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)。
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添加新的拦截器,并用拦截器类的完全限定名称来填写类名称属性。
To add a new Material object to your design, you need to invoke the add method of the Materials class.
要将一个新的Material对象添加到设计中,需要调用Materials类的add方法。
Using open classes to add new methods to a built-in class is a common technique for adding expressiveness to DSLs.
使用打开类将新方法添加到内置类是一种将表现力添加到 DSL的常用技术。
If you want to add more subtypes, simply create a new concrete class and use it. Hence we can now easily extend our code without any worries.
如果你想添加更多子类型,只需创建一个新的具体类,并使用它。因此,我们现在可以很容易地扩展我们的代码,还没有任何忧虑。
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中则没有这种功能。
Knowing that Serialization allows for refactoring, let's see what happens when we decide to add a new field to the Person class.
既然已经知道序列化允许重构,我们来看看当把新字段添加到person类中时,会发生什么事情。
Use the standard Eclipse mechanism to add a class with the new class wizard, as in Figure 19.
可以使用标准的Eclipse机制,用新建类向导添加类,如图19所示。
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组的列表,然后将它们添加到向量中,最后把这个向量存储在会话对象中。
The Visualize menu, shown in Figure 6, allows you to add the selected element(s) to a new Sequence Diagram, Topic Diagram, or Class Diagram.
Visualize菜单,如图6所示,允许您将所选的元素添加到新的序列图、Topic 图,或类图中。
But you'll find that there are times when it's equally clear that you must add new functions to the interface of a derived class.
但是你也会发现有时候你很明显的必须去给衍生类增加新的方法。
Add a new member field to the class and use that instead of a local variable.
在类中添加一个新的成员字段,并使用这个字段而不是局部变量。
应用推荐