在重构后,所有对这个类中的数字或字符串文字的使用都将指向该字段,而不是指向数字或字符串文字本身。
After the refactoring, all USES of that number or string literal in the class refer to that field, instead of the number or string literal itself.
是的,我可以在类中添加一个新的成员字段,并使用这个字段而不是局部变量。
Well, I could add a new member field to the class and use that instead of a local variable.
支持导入常量:这个特性使静态方法和字段能够被导入,这样在访问静态成员时就不必使用完全限定的类名。
Support for importing constants: This facility allows static methods and fields to be imported, avoiding the need to use fully qualified class names when accessing static members.
然而,这个命名糟糕的公共类在代码中保留的时间越久,则相关的使用也会越来越多,改变起来就越来越困难。
However, the longer the badly named class remains in the code base the more prevalent its usage becomes, and the bigger the task of changing it.
但是,由于某些其它的SAX 2.0不支持和改动,在SAX 2.0中已不再使用这个类。
But due to some additional SAX 2.0 deprecations and changes, this class is no longer used in SAX 2.0.
在使用formatter类时,可以将实现了这个接口的对象传递给构造函数Formatter以把它作为目标。
An object implementing this interface can be used as the destination when using a Formatter class by passing the object into the Formatter constructor.
因此,当这个类的一个实例放入到类集合中的任何一个中时,使用的是Object . equals版本的方法,而不是在Bob中定义的版本。
As a result, when one of the instances of this class is put into any of the collection classes, the Object.equals version of the method will be used, not the version defined in Bob.
在使用这个扩展的类时,可以用标准Spring语言改变装配器,并在需要时回到默认的行为。
When using this extended class, I can change the assembler using the standard Spring idiom and fall back to default behavior if I need to.
这个类可以处理检验用户名和密码的UsernameToken示例,也可以处理使用签名和加密的示例(在本文的下一节中讨论)。
This class includes handling for both the UsernameToken case of verifying a username and password and the case of using signing and encryption (discussed in this article's next main section).
您也学习了如何定义新的属性,在子类中调用相应函数,以及如何在您的应用程序代码中使用这个新类。
You learned how to define new properties and call corresponding functions in the superclass and how to use the new class in your application code.
即使在编写这个类的同时也许正在编写一个特定的应用程序,该类一样可以在组织的任何项目中使用。
Although this class was written perhaps while a specific application was written, the class can be used by any project in the organization.
在这个例子中所使用的约定是,使用一个和合成要素名称一致的类图表,并且在包含该合成要素的包中,显示它的外部视图。
The convention used in this example is to use a class diagram with a name that is the same as the component, and, in the package containing the component, to show its external view.
修改的类装入器使用看上去几乎与普通类文件完全一样的模板文件,不同的是这个模板文件在常量池中有一些“洞”,在装入时为每个实例化类填充这些“洞”。
A modified class loader USES template files that look almost exactly like ordinary class files except for "holes" in the constant pool that are filled in at load time for each instantiation class.
因为您需要在其他包内使用来自这个包的两个类,您将需要导出其在清单中的包。
Because you want to use the two classes from this bundle inside other bundles, you will need to export their packages in the manifest.
科学家们的下一个计划是升级HARPS的硬件和软件,并使用这个仪器在类太阳的恒星周围进行更精细的搜索,去发现是否存在可能支持生命存在的、多岩石的类地球的行星。
Scientists next plan to upgrade HARPS hardware and software and use the instrument to conduct a more refined search of nearby sunlike stars for rocky Earthlike planets that could support life.
注意,这个相同的类,只要更改包名和类名,就可以在您的每个GAE项目中使用。
Note that this same class, with changes for package name and class name, can be used in each of your GAE projects.
当你有足够多的功能需要归并到一个类里,并且这个类在仅会被外层类所使用时,一个嵌套类就非常有用。
A nested class make sense when you have enough related functionality to lump together in a class, but the functionality is only ever going to be used by its "outer" class.
在这个工程中有一些数据包装类和从属类用来在真实情景中演示典型的类路径问题(尽管在这个工程中使用它们是多余的)。
There are some data wrapper classes and dependent classes in this project to demonstrate typical classpath issues in a real scenario (although their use is superfluous in this project).
为了使用这个处理程序,您需要确保WASv5WSAExtensions. jar在Web服务客户端应用程序的类路径中。
To use the handler, you need to ensure that WASv5WSAExtensions.jar is on the classpath of the Web services client application.
例如,Invoice类会有grandtotal属性,这个属性由其实例在计算时使用,但它不保存到数据库中。
For example, an Invoice class may have a grandTotal attribute that is used by its instances for calculation purposes, but that is not saved to the database.
在这个例子中,还可以使用适当的数据库名,在称为dbName 的派生业务对象类中声明私有String属性。
In this example, a private String attribute can also be declared in derived business object classes, called dbName, with the name of the appropriate database.
而且,因为两个映射的类(Building和Land)是从estate中继承而来,所以我们可以在HQL查询中使用这个抽象超类,如清单14所示。
And, since our two mapped classes (Building and Land) inherit from Estate, we can use this abstract superclass in our HQL queries, as shown in Listing 14.
您可以使用HTML元素来在另一个web页面中显示web页面,我们正好利用这一优势来创建一个新extbrowserwindow类,该类可以在Ext . Window中显示这个web页面。
You can use the HTML element to display web pages inside another web page, so we'll take advantage of that to create a new ExtBrowserWindow class that will display this web page inside an Ext.Window.
在我使用alpha版时,我还不得不直接使用会员类手工为这个表单编写代码。
Since I'm using the alpha bits, though, I'll have to code this particular form by hand using the Membership class directly.
当我使用Groovy插件的时候,我必须能够在包中声明我的领域类,然而JetBrains插件不能处理这个问题。
When it comes down to it I must be able to declare my domain classes in packages and the JetBrains plugin can't handle that.
在使用某个类名时,Ruby会检查是否已经从类路径中加载了相同名称的类,如果是,则会在第二次操作时重新打开这个类。
When you use a class name, Ruby checks to see if it has already loaded a class from the classpath by that same name and, if it has, the second occurrence reopens the class.
包含一个用类写入响应的输出流。请遵守HTTP协议在适当的时候使用这个流。
Contains the output stream for writing a response back to the client. Proper adherence to the HTTP protocol must be used when writing to this stream.
在类中添加一个新的成员字段,并使用这个字段而不是局部变量。
Add a new member field to the class and use that instead of a local variable.
这个类在每个图中必须使用相同的名字,否则读者就可能被弄糊涂。
This class should have the same name on each diagram; otherwise your readers will become confused.
但是如果你在一个类中已经使用了一个特征,然后再冻结这个特征,则并不会影响这个类中的这个特征的使用。
However, if you have used a characteristic in a class, and then set "Locked" status for the characteristics, this does not affect the characteristic in the class.
应用推荐