转换类型可分为三类:方法调用转换、字段访问转换和新对象转换。
These fall into three categories: method call transformations, field access transformations, and a new object transformation.
在FieldSetEditor中,我实现了匹配字段访问的方法签名。
In FieldSetEditor, I implement the method signature that matches field accesses.
在第2部分,我展示了无论是对于字段访问还是方法调用,反射都比直接代码慢很多倍。
Back in Part 2, I showed how reflection is many times slower than direct code for both field access and method calls.
其中包括对字段访问或者方法调用使用拦截器,在现有类中添加mix - in接口实现等。
These include using interceptors on field accesses or method calls, adding mix-in interface implementations to existing classes, and more.
字段访问连接点对应着字段的读和写;在这个例子中,在Accoun t类上对name字段进行了赋值。
Field access join points correspond to reads and writes of fields; in this case, an assignment of the name field that is made on the Account class.
它给出了加载的每一个类的每一个方法中所做的工作的详细分析,列出了所有方法调用、字段访问和新对象创建。
This gives the detailed breakdown of what's being done within each method of each class loaded, listing all method calls, field accesses, and new object creations.
这些特性使得对程序行为做出系统性的变更很容易,其中包括诸如拦截所有方法调用或所有字段访问这样的变更。
These features make systematic changes to program behavior easy, including changes such as intercepting all calls to a method or all accesses of a field.
字段访问相对速度较快,但在少数时候,getter访问可能会提供与直接字段访问略有不同的值,特别是在涉及子类的时候。
Field access may be marginally faster, but rarely. Sometimes, getter access may provide a slightly different value from direct field access, especially when subclasses are in play.
本文提供了定制数据库过程的一步步的细节内容,并且包括一些如何对某些字段控制访问权限的钩子函数。
It provides step-by-step details on the procedure for customizing your database, and includes some hooks on how to control access rights to certain fields.
请记住,在使用字段隐藏属性时,可以通过其他机制访问数据条目。
Remember that when you use field hiding properties, the data items can be accessed through other mechanisms.
默认情况下,这些字段是空的,并且不允许访问。
与直接在已编译代码中调用方法或访问字段相比,反射在性能上也处于劣势。
Reflection also suffers a performance disadvantage when compared to calling a method or accessing a field directly in compiled code.
为了进一步支持DB2,可以在每个表单或每个数据库的基础上,定义将按照一定关系访问的字段。
To further support DB2, you can define fields to be accessed relationally on a per form or per database basis.
数据存储在各种活动可以访问的名为数据字段的全局变量中。
Data is stored in global variables called data fields, which the activities can access.
决不应该直接访问字段;而应该使用访问器。
Fields should never be accessed directly; instead, accessors should be used.
类一旦被解析,就会以一种线程安全的方式修改原始代码位置以便直接访问静态字段的地址,因为此时已获知该地址。
Once the class has been resolved, the original code location is modified in a thread-safe way to access the static field's address directly because that address is then known.
可以按照表或者数据库定义以关系方式访问的字段。
You could define fields to be accessed relationally on a per-form or per-database basis.
访问静态字段与此类似。
如果类型图中的一个节点看起来过大,您可双击它,向下访问到字段布局视图(如图23所示)。
If a node in a type graph seems suspiciously large, you can double-click on it to drill down to the field layout view (Figure 23).
如果不需要访问某对象的字段,将方法设置为静态,调用会加速15%到20%。
If you don't need to access an object's fields, make your method static. Invocations will be about 15%-20% faster.
许多编程语言支持字段索引的概念,字段索引用于访问重复字段的特定实例。
Many programming languages support the concept of a field index for accessing a particular occurrence of a repeating field.
因此,对于JNI 来说,本机代码从传递进来的对象中访问大量单独字段时会导致性能降低。
For JNI, therefore, causing the natives to reach for many individual fields from the objects passed to them leads to poorer performance.
对于那些由未解析变成已解析并被频繁访问的字段来说,这种简单的过程可能带来严重的性能问题。
For unresolved fields that become resolved and frequently accessed, this naive procedure can be a huge performance problem.
例如,报告对所选字段的所有写访问的记录器(logger)在许多应用程序中都会发挥作用。
For example, a logger that reports all write accesses to selected fields would be a useful aspect to apply in many applications.
这通常意味着代理需要是Person的一个内部类,以便能访问private字段。
Often this means the proxy will need to be an inner class of Person to have access to private fields.
内部类会在外部类中任何需要访问mValue字段或调用doStuff方法的地方调用这些静态方法。
The inner class code calls these static methods whenever it needs to access the mValue field or invoke the doStuff method in the outer class.
看上去您是在直接访问字段,但是事实上您在调用后台的相应的getter方法。
It may look like you are directly accessing the field, but in reality you are calling the corresponding getter method behind the scenes.
首次使用ReaderNames字段时,尝试将需要访问文档的每个单独用户的名称填入该字段中。
When first using Reader names fields, it is tempting to put into the field the names of each individual user who needs to access the document.
对这个动态类我想做的最后一个改进,是用成员变量访问字段,而不是用笨重的get _和set _操作符。
One final improvement I want to make on this dynamic class is to use member variables to access the fields, instead of the clunky get_ and set_ operators.
把所有控件绑定到BindingSource对象之后,就可以在XAML代码中访问所有字段。
Once the code binds all controls to the BindingSource object, then all fields are accessible in the XAML part.
应用推荐