Reflection is much slower than direct code when used for field and method access.
当用于字段和方法接入时反射要远慢于直接代码。
visibility shows field and method modifiers: public, protected, private, or default.
visibility展示字段和方法修改语:public、protected、private或default。
Class references in this internal form are used as part of field and method descriptors.
采用这种内部形式的类引用是作为字段和方法描述符的一部分使用的。
Now that you've seen field and method descriptors, you're ready to hear about signatures.
上面已经介绍了字段和方法描述符,那么接下来将介绍签名。
The signature format extends the idea of field and method descriptors to include generic type information.
签名格式扩展了字段和方法描述符的概念,将泛型类型信息包含于其中。
We can't instantiate instances of abstract classes, even when all their field and method members are concrete.
我们不能实例化一个抽象类,即使它们的字段和方法都是具体的。
First though, I'll give some necessary background with a look at the internal form of class names and the field and method descriptors used by the JVM.
首先将介绍一些必备的背景信息,以使您了解类名称的内部结构及JVM所使用的字段和方法描述符。
The field and method signatures from Listing 2 make use of the same type of variable format as seen in the superinterface signature, but aside from that, they don't show anything new.
清单2 中的字段和方法签名利用了与超接口签名相同的变量格式类型,其他都与前面介绍的内容相同。
I also wrote a similar timing test program for creating objects using reflection. The differences for this case aren't nearly as significant as for the field and method call cases, though.
我还为创建使用反射的对象编写了类似的计时测试程序,但这种情况下的差异不象字段和方法调用情况下那么显著。
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.
它给出了加载的每一个类的每一个方法中所做的工作的详细分析,列出了所有方法调用、字段访问和新对象创建。
For method calls, I tried the same three access variations as for field access, with the added variable of using no-argument methods versus passing and returning a value on the method calls.
在方法调用中,我试用了与字段接入相同的三种接入变量,并增加了使用无参数方法变量,而不是在方法调用中传递和返回一个值。
These fall into three categories: method call transformations, field access transformations, and a new object transformation.
转换类型可分为三类:方法调用转换、字段访问转换和新对象转换。
After generalization, the recipients could edit and process the class, field, and method names in the same way as any other API names.
泛化之后,接收方可以象编辑和处理任何其它API名称一样编辑和处理类、字段和方法名称。
A method descriptor just combines field descriptors to specify the parameter types and return type of a method.
方法描述符结合了字段描述符,以指定方法的参数类型和返回类型。
AOT code must therefore be generated with every static, field, class, and method reference unresolved.
AOT代码因此必须在没有解析每个静态、字段、类和方法引用的情况下生成。
The method and constructor templates are similar to the field template, as Listing 4 shows.
方法和构造函数模板与字段模板类似,如清单 4 所示。
Listing 6 shows a sample for a field and for a method.
清单6显示了样例字段和方法。
Only the button's label field and click method remain.
只有按钮的label字段和click方法被保留了下来。
You pass eval the name of the field to evaluate and the method, in turn, determines the current data item and prepares a regular call through DataBinder.Eval.
您将计算的字段名和方法传递给Eval,决定当前的数据项并通过DataBinder . Eval准备一个常规调用。
You'll notice that rather than params, variables are passed using the data field, and the method needs to be specified in lowercase.
你也许注意到,与使用params不同,这里使用data字段传递变量,而且必须使用小写指定方法。
In this case, it drops the method implementations and field declarations defined in the trait into the class that implements the trait, Person.
在这种情况下,它会将特征中定义的方法实现和字段声明纳入实现特征的类person中。
When the client requests Suggestions from the server, it will call the Map's get method and pass the current content of the input field as a parameter.
当客户端需要来自服务器的推荐时,它会调用Map的get方法,并将当前输入栏内容能够作为参数传递。
Second, given that this task class is a Runnable, the result of the array access needs to be assigned to the state field (and state needs to be used in an overriding toString method) to prevent DCE.
第二,既然这个任务类是Runnable,为了防止DCE,必须把数组访问的结果赋值给state字段(以及覆盖的toString方法中需要使用的state)。
Fortunately, whenever ProGuard runs, it outputs a
幸运的是,每当混淆器运行时候,它都会输出到文件
This means that a JRuby object is not much more than a Map from method names to their implementations and from field names to their values.
这意味着JRuby对象与Map没有什么两样,有着从方法名字到方法实现的映射,以及域名到其值的映射。
Using a private field and annotating the setter method is considered a best practice.
使用私有字段并注释setter方法被视为最佳做法。
Create getters and setters for the four fields by following the method shown in Listing 1 for the symbol field.
按照清单1中显示的用于symbol字段的方法为以上4个字段创建getter和setter。
Not caching method IDs, field IDs, and classes.
不缓存方法ID、字段id和类。
It's not there because I didn't provide the name field with the getter and setter method.
它不在这里,因为我没有通过getter和setter方法提供name字段。
The field class itself is pretty simple; it pretty much consists of the instance variables of the field, accessor methods for those instance variables, a toString method, and a normal constructor.
Field类本身相当简单;它几乎包含了这个字段的实例变量,访问这些变量的方法,一个toString方法,和一个标准的构造方法。
应用推荐