Because of these limitations I wanted to avoid using reflection for data binding in JiBX.
由于存在这些局限性,所以我想要避免将反射用于JiBX中的数据绑定。
This can be done easily using reflection on the bytecodes returned by the ICompilerRequestor implementation.
对ICompilerRequestor实现返回的字节码使用反射很容易做到。
The JVM records this signature information when loading a class and makes it available at run time using reflection.
JVM在装载类时记录这个签名信息,并在运行时通过反射使它可用。
I find the constructor for the object using reflection and instantiate it providing a random number between 1 and 10.
我使用反射(reflection)查找这个对象的构造程序,并提供1到10之间的一个随机数字对其实例化。
How to get field value using reflection?
如何使用反射获取字段值?
Describes security issues related to creating dynamic assemblies using reflection emit.
介绍与使用反射发出创建动态程序集有关的安全问题。
This is true both for method discovery and for method invocation performed using reflection.
使用反射执行的方法发现和方法调用都是如此。
This could be done using reflection APIs, or potentially by accessing the XAML schema context.
这可以通过使用反射API或潜在访问XAML架构上下文来完成。
You can build a model of this type by using reflection, after first loading the target program's class files into the JVM.
可以利用反射,在第一次把目标程序的类文件装入 JVM 之后,创建这种类型的模型。
A more serious drawback for many applications is that using reflection can obscure what's actually going on inside your code.
许多应用更严重的一个缺点是使用反射会模糊程序内部实际要发生的事情。
Keep in mind also that using reflection to invoke private methods does introduce a level of brittleness to the resulting tests.
还请记住,使用反射调用private方法会对生成的结果带来一定程度的脆弱性。
For example, say that you want to display all of the public methods of a given class using reflection. Listing 7 shows an example.
例如,假设您希望利用反射显示给定类的所有公共方法。
Here the HolderBean class contains a pair of properties that can be accessed at run time by using reflection to call the get and set methods.
在这里,HolderBean类包含一对属性,通过使用反射来调用get和set方法,可以在运行时访问这一对属性。
Microsoft is looking into adding the ability to "light-up" additional features using reflection and late binding, but there are no definite plans as of yet.
微软正在研究通过反射和迟绑定来“开启”额外特性的可行性,但至今没有任何明确的计划。
To demonstrate the performance cost of using reflection, I prepared a set of benchmark programs for this article (see Resources for a link to the full code).
为了阐述使用反射的性能成本,我为本文准备了一组基准程序(见参考资料,完整代码链接)。
Of course, a completely generic approach can be achieved using reflection, but that makes life a lot more complicated, and it's outside the scope of this article.
当然,可以通过反射实现一种完全通用的方式,但这会使事情复杂得多,也超出了本文的范围。
The compiler compiles the regular expression into a custom scanner class using reflection emit because the user has requested that the expression be compiled.
由于用户已请求编译表达式,编译器使用反射发出将正则表达式编译为自定义扫描仪类。
Rather than using reflection to access a property of an object, for example, you can construct a class at run time that does the same thing — but does it much faster.
它没有使用反射来访问对象的属性,例如,可以在运行时构建一个类来做同样的事——但这样做会快许多。
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 is a rare case of Groovy violating the Rule of Least Surprise, but because getting elements out of a map is far more common than using reflection, it is an exception that I can live with.
这是Groovy比较罕见的打破 “最少意外原则” 的情况,但是由于从map获取元素要比使用反射更加常见,因此我可以接受这一例外。
In their case, they avoided using reflection by instead working directly with class files, adding code to the classes generated by the compiler in order to provide direct access for the framework.
在他们的情况中,通过直接处理类文件,同时向编译器所生成的类添加代码以便为框架提供直接访问,来避免使用反射。
Probably the best way to avoid their creation during the program is to avoid using reflection services to map class, field, or methods from strings during the time-critical parts of your application.
或许避免在程序执行期间创建这些类的最佳方式在于,避免在应用程序的时间关键型部分使用反射服务来从字符串映射类、字段或方法。
Using reflection like this represents a trade-off: complexity versus conciseness.
像上面这样使用反射代表了一种权衡:复杂性和简洁性。
Until now, the framework obtained this information directly from XPO metadata, sometimes using Reflection.
直到现在,这个框架直接从XPO元数据获取信息,有时用反射。
Using reflection mechanisms, highly trusted code that can reference your object can get and set private members.
通过使用反射机制,那些能够引用您的对象的、高度受信任的代码,可以获取和设置私有成员。
Using reflection then, you have an ActionListener implementation, but don't have an added .class file in the file system.
然后使用反射,您有一个ActionListener实现,但是没有在文件系统中增加一个 .class 文件。
Using reflection techniques on static members of a type differs slightly from reflecting on instance members of an object.
在类型的静态成员上使用反射技术与在对象的实例成员上进行反射有一点小小的差别。
Using reflection allows applications to be structured for flexibility, with external information used at run time to hook pieces together into a working configuration.
使用反射使构建应用程序更加灵活,可以在运行时用外部信息把各个片断挂接(hook)在一起,形成一个工作配置。
Using reflection allows applications to be structured for flexibility, with external information used at run time to hook pieces together into a working configuration.
使用反射使构建应用程序更加灵活,可以在运行时用外部信息把各个片断挂接(hook)在一起,形成一个工作配置。
应用推荐