reflection
Set dynamic parameter value into generic method of Java Reflection
I\'m a new java developer, and I want to develop my code with reflection. I have a class call User: I want to pass dynamic value to those 3 methods, so in java reflection I got some code but I don\'t[详细]
2023-04-12 04:19 分类:问答Using reflection to get each instance of XmlElementAttribute for a single property
I\'m trying to list the possible types that Item could contain. However I am stuck in that I can\'t call Item.GetType() to loop through its Attributes as this would just return the attributes of the t[详细]
2023-04-12 03:40 分类:问答Trim all string properties
I need to trim some string properties in my objects, but I don\'t want to go to all objects and properties and in the set properties do the trim method (there is a lot of objects, 300+ and a lot of st[详细]
2023-04-12 00:38 分类:问答delphi typinfo SetPropValue
Hi I have a problem with this code: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,[详细]
2023-04-12 00:19 分类:问答How to instantiate objects whose constructor requires parameters from a string holding the class name?
Is there a way to instantiate objects from a string holding their class name? I got a problem basically the same with the above开发者_开发技巧 question. But I need to instantiate a class with some p[详细]
2023-04-12 00:18 分类:问答Why do I need to use reflection to instantiate a generic, given a type object?
I have a list of Typ开发者_如何学Pythone objects corresponding to my entities, and I want to use those Types to instantiate corresponding generic binders...well let me just show this:[详细]
2023-04-11 21:30 分类:问答How to match classes of "boolean" types and "Boolean" types?
Consider the following code: object U { def foo(s:String) = true } val boolType = Class.forName(\"java.lang.Boolean\")[详细]
2023-04-11 20:39 分类:问答How do I create an instance and assign a default value based on a Type parameter?
I have a开发者_运维问答n array of Type objects corresponding to int, bool, string, float, int? ...[详细]
2023-04-11 19:44 分类:问答How to cast a generic type at runtime in c#
I need to create an IEnumerable<IEnumerable<T>> when I only know T at runtime. I have built up my collection like so:[详细]
2023-04-11 19:08 分类:问答get information on an assembly
I want to get information on an Assembly in my C# application. I use the following: Assembly.GetCallingAssembly();[详细]
2023-04-11 13:16 分类:问答