你可以认为它是一个匿名代码块。
此外,它是对代码本身进行验证,而不是对代码产生方的身份进行验证,因而可信度更高并可以支持匿名代码。
Besides, it is more trustworthy and can support the verification of anonymous codes because the code itself instead of the authority of a code producer is verified.
实例初始化器允许您为一个匿名内部类执行构造代码。
Instance initializers allow you to execute construction code for an anonymous inner class.
如果这个匿名类可被作为一个内部类单独放置,那么清单1中的代码将会简洁很多。
The code in Listing 1 would be much neater if the anonymous class was placed separately as an inner class.
此代码还举例说明了指定回调的参数的一种方法:作为一个匿名列表,具有到作为第一个参数的回调的引用,随后是所需的参数。
This code also demonstrates one way to specify arguments to a callback: as an anonymous list, with a reference to the callback invoked as the first element, followed by the required parameters.
通过用匿名函数来替换正式函数定义,您可简化代码。
By replacing formal function definitions with anonymous functions, you simplify code.
在类似匿名内部类的机制中使用代码块的一个优势是其简洁性。
One of the advantages of using code blocks over a similar mechanism like anonymous inner classes lies in its conciseness.
相比于每个匿名内部类都要对应一个类的做法来说,这种方式是个极大的改进,同时也使得代码的可读性更好。
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.
匿名块如何为过程代码的测试、原型化和问题诊断提供便利。
How anonymous blocks can facilitate the process of testing, prototyping, and troubleshooting of procedural code.
这个优点让匿名块在诊断问题、原型化和测试过程代码时发挥重要作用,因为这些任务通常需要多个更改-执行过程。
That makes the anonymous blocks very useful when troubleshooting, prototyping, and testing procedural code, because these are tasks that usually require multiple change-and-execute runs.
匿名类允许创建这样的对象,该对象能够捕获定义它们的一部分环境,但是对象和代码块不一样。
Anonymous classes let you create objects that capture part of the environment in which they were defined, but objects and blocks of code are not the same thing.
分派表可以包含用来处理特定元素的实际代码(匿名子例程),也可以包含对别处定义的命名子例程的引用。
The dispatcher can either contain the actual code used to deal with a particular element as an anonymous subroutine or it can contain a reference to a named subroutine defined elsewhere.
匿名函数的参数是两项市场数据:股票代码和价格。
The anonymous function takes two market data as arguments: a ticker symbol and a price.
上面的代码有两点值得我们注意:首先,匿名内部回调类的实例化需要大量的样板代码。
Two things are worth mentioning when considering this code: First, the instantiation of an anonymous inner callback class requires a great amount of boilerplate code.
例如,清单1所示的代码使用一个匿名类创建了一个ThreadFactory。
As an example, the code in Listing 1 USES an anonymous class to create a Thread Factory.
这样一来,便可以很自然地组织代码,并将匿名内部函数的概念引入到OpenLaszlo开发当中。
This allows you to group code naturally and brings the concept of anonymous inner functions to OpenLaszlo development.
任何大 量使用了匿名方法的项目,在升级到VisualStudio 2008时,有可能无法保持代码分析的清洁性。
The bad news is that any project making heavy use of anonymous methods is likely no longer Code Analysis clean on its upgrade to Visual Studio 2008.
就是说,closure是个匿名函数,在其创建时,将来自创建该函数的代码范围内得变量值附加到它本身。
That is, a closure is an anonymous function that, when created, attaches to itself the value of variables from the scope of the code that created the function.
这些匿名Logger不属于命名空间,他们的各种方法不包含权限检查,不受信的代码可以修改它们的控制信息。
These anonymous Loggers are not registered in the global namespace and their methods are not access-checked, allowing even untrusted code to change their logging control Settings.
考虑到包装这个方法的匿名内部类的真正用途,我留下了几行难看的样板代码—addorderfrom方法体中的两行代码。
I'm left with some ugly boilerplate code because of the anonymous inner class wrapping this method's real purpose - the two lines of code that appear in the body of the addOrderFrom method.
每个Wicket应用的源代码中都会发现匿名的内部类。
In every Wicket application source code you will find anonymous inner classes.
方法接收一个新的客户端对象,以及一个匿名方法,该方法持有的代码与正常使用using语句块包含的代码完全相同。
This method takes a new client object and an anonymous method that holds the same code a normal using block would contain.
IEnumerabl的函数将通常以一个“ReturnIterator”代码块开始,它是VB新匿名函数、多行函数语法的一种特例。
The IEnumerable function will generally begin with a "Return Iterator" block, which is a special case of VB's new anonymous, multi-line function syntax.
要开始使用Portland,请用匿名CVS获得源代码。
To start with Portland, retrieve sources with anonymous CVS.
上周它冻结了一些匿名投资者500万美元利润并提起了诉讼,原因是他们在德州事业(证券代码TXU)被收购的消息发布前,通过期权市场进行套利活动。
Last weekit filed a suit against unknown investors who had profited in theoptions market before the announcement of a takeover of TXU, the Texanutility.
最终,为了避免破坏代码的可读性ThoughtWorks的工程通常避免使用编程语言特有的语法(例如Ruby语言中匿名全局变量)。
To this end, ThoughtWorks projects generally avoid the more magical features of languages (like the implicit global variables in Ruby, for example) because it hurts readability.
真正程序员从来不写代码的注释,如果代码非常难写,那么同样代码的注释也会非常难懂—匿名。
Real programmers don't comment their code. If it was hard to write, it should be hard to understand. - unknown.
为了与匿名方法一起使用,委托和与之关联的代码必须一起声明。
For use with anonymous methods, the delegate and the code to be associated with it are declared together.
要将代码块传递为委托参数,创建匿名方法则是唯一的方法。
Creating anonymous methods is essentially a way to pass a code block as a delegate parameter.
米尔本先生说,固体橡树接到一个匿名电子邮件星期五指出,绿色大坝可能包含的部分,他的公司的代码。
Mr. Milburn said Solid Oak received an anonymous email Friday stating that Green Dam may contain parts of his company's code.
应用推荐