Why do we have to use Reflection API?
我们为什么要使用反射API?
Yes, some USES of the reflection API can break data encapsulation.
是的,一些使用反射api可以打破数据封装。
There is a flexible, customized reflection API that is useful for tools.
系统还提供了一种灵活的定制反射API,对工具很有用。
No, not all uses of the reflection API do break data encapsulation.
不,不是所有使用反射API做打破数据封装。
No, reflection API does not change the purpose of data encapsulation.
不,反射api不改变目的数据封装。
Isn't the reflection API changing the very purpose of Data Encapsulation?
不是API改变数据封装的目的反射?
Also, we can use the reflection API to introspect a closure itself, as shown in Listing 12.
此外,可以使用反射api来内省(introspect)闭包本身,如清单12所示。
Using the Reflection API, you obtain each variable's value and store it in the inner vector.
用Reflection API获得每一个变量的值并将它存储到内部vector中。
To support the reflection API for reloaded classes, results of the API calls are modified accordingly.
为了给重加载类提供反射api支持,该API调用的结果也相应地被修改。
By design, closures are anonymous functions, which means they do not appear in the reflection API.
按照设计,闭包是匿名函数,这意味着它们不显示在反射api中。
In this section, I'll dig into the details of how the reflection API makes the type information available.
在这一节,我将深入挖掘反射api如何使类型信息可用的细节。
In this section, I ll dig into the details of how the reflection API makes the type information available.
在这一节,我将深入挖掘反射api如何使类型信息可用的细节。
PHP has a useful reflection API, which allows us to reverse-engineer classes, interfaces, functions, and methods.
PHP有一个有用的反射API,它允许我们对类、接口、函数和方法执行反向工程。
We saw how well we can use the reflection API to create dynamic closures, as well as introspect existing closures.
我们看到了如何使用反射api创建动态闭包,以及如何内省现有的闭包。
Indeed, a wise programmer only breaks encapsulation via the reflection API when there is a good reason to do so.
事实上,一个聪明的程序员只有通过反射api封装时有一个很好的理由这样做。
The reflection API has great support for closures, as we've now seen, in the form of being able to create them from existing functions and methods dynamically.
正如我们所见,反射API能够通过现有函数和方法动态创建闭包,从而为闭包提供强大的支持。
A module created using the reflection emit API is called a dynamic module for the duration of the run in which the module was created.
使用反射发出API创建的模块在创建模块的运行期间称为动态模块。
A module created using the reflection emit API is called a dynamic module for the duration of the run in which the module was created.
使用反射发出API创建的模块在创建模块的运行期间称为动态模块。
应用推荐