Gang Of Coders
Home
About Us
Contact Us
All Reflection Solutions on Gang of Coders
Total of 322 Reflection Solutions
Java toString() using reflection?
Java
Performance
Reflection
Tostring
Finding out if a type implements a generic interface
C#
.Net
Reflection
How to test if MethodInfo.ReturnType is type of System.Void?
C#
Reflection
Methodinfo
How can you loop over the properties of a class?
C#
Reflection
How to cast reflect.Value to its type?
Reflection
Go
Using the Web Application version number from an assembly (ASP.NET/C#)
C#
.Net
asp.net
Reflection
Assemblies
Reflection - get attribute name and value on property
C#
Reflection
Propertyinfo
Instantiating a constructor with parameters in an internal class with reflection
C#
Reflection
How do you get the root namespace of an assembly?
.Net
Reflection
How to pass a function as a parameter in C#?
C#
Reflection
Java Reflection: Why is it so slow?
Java
Performance
Reflection
Scala: How do I dynamically instantiate an object and invoke a method using reflection?
Reflection
Scala
Name Mangling
Check type of primitive field
Java
Reflection
Primitive
How can I add reflection to a C++ application?
C++
Reflection
Templates
Sfinae
Getting default value for primitive types
Java
Reflection
Guava
How to get activerecord associations via reflection
Ruby
Reflection
Activerecord
GetEntryAssembly for web applications
C#
Reflection
Assemblies
Code Generation
Stack Frame
C# Using Activator.CreateInstance
C#
Reflection
Activator
Is it possible to invoke private attributes or methods via reflection
Java
Reflection
How to make a simple dynamic proxy in C#
C#
.Net
Reflection
Proxy
Aop
How to check whether a variable is a class or not?
Python
Reflection
Instantiating a JavaScript object by calling prototype.constructor.apply
Javascript
Reflection
Modifying final fields in Java
Java
Reflection
Final
Getting Enum value via reflection
C#
Reflection
Enums
C# instantiate generic List from reflected Type
C#
Reflection
Generics
How to get Custom Attribute values for enums?
C#
.Net
Reflection
Custom Attributes
How can I return a default value for an attribute?
Python
Reflection
Attributes
Default
Void
Dynamically find the class that represents a primitive Java type
Java
Reflection
Types
Primitive
Using reflection, how do I detect properties that have setters?
C#
Reflection
Java Reflection calling constructor with primitive types
Java
Reflection
Run piece of code contained in a String
Java
Reflection
Getting all types in a namespace via reflection
C#
.Net
Reflection
Namespaces
Is there a way to set properties on struct instances using reflection?
C#
Reflection
Propertyinfo
How to call a generic async method using reflection
C#
Reflection
Async Await
Java reflection: Is the order of class fields and methods standardized?
Java
Reflection
Standards Compliance
Java: instantiating an enum using reflection
Java
Reflection
Enums
Changing private final fields via reflection
Java
Reflection
Final
Calling generic method using reflection in .NET
.Net
Generics
Reflection
Invoking setter method using java reflection
Java
Reflection
Lambda expression in attribute constructor
C#
.Net
Reflection
Attributes
Custom Attributes
Reflection type inference on Java 8 Lambdas
Java
Generics
Reflection
Lambda
Java 8
Get a Swift Variable's Actual Name as String
Swift
Reflection
Is the use of dynamic considered a bad practice?
C#
Dynamic
Reflection
How to use .NET reflection to check for nullable reference type
C#
Reflection
Nullable
Nullable Reference-Types
Converting an integer to a boxed enum type only known at runtime
C#
.Net
Reflection
Enums
Can I use reflection to inspect the code in a method?
C#
Reflection
Use of IsAssignableFrom and "is" keyword in C#
C#
asp.net Mvc
Casting
Unity Container
Reflection
How do I create a C# array using Reflection and only type info?
C#
Arrays
Reflection
Constructor
GetMethod for generic method
C#
.Net
Reflection
Method to dynamically load java class files
Java
Class
Reflection
Dynamic
Load
How to set the InnerException of custom Exception class from its constructor
C#
.Net
Exception
Logging
Reflection
Get all of the Classes in the Classpath
Java
Reflection
Class
Get string name of property using reflection
C#
Reflection
Propertyinfo
Java Reflection - Object is not an instance of declaring class
Java
Reflection
How do I use reflection to call a generic method?
C#
.Net
Generics
Reflection
How to create a generic array in Java?
Java
Arrays
Generics
Reflection
Instantiation
Find a private field with Reflection?
C#
.Net
Reflection
.Net Attributes
Get property value from string using reflection
C#
Reflection
Properties
How to determine if a type implements a specific generic interface type
C#
.Net
Reflection
Type.GetType("namespace.a.b.ClassName") returns null
C#
Reflection
Get name of property as a string
C#
Reflection
Properties
Using isKindOfClass with Swift
Ios
Swift
Reflection
Introspection
Check if a Class Object is subclass of another Class Object in Java
Java
Class
Reflection
How to get a list of properties with a given attribute?
C#
.Net
Reflection
Invoking a static method using reflection
Java
Reflection
Static
BindingFlags.IgnoreCase not working for Type.GetProperty()?
C#
Reflection
Getproperty
Bindingflags
Reflection: How to Invoke Method with parameters
C#
Reflection
Parameters
Methods
Invoke
Tool to generate JSON schema from JSON data
Json
Validation
Reflection
Jsonschema
What is the difference between getFields and getDeclaredFields in Java reflection
Java
Reflection
How costly is .NET reflection?
C#
.Net
Performance
Reflection
Getting assembly name
C#
.Net
Reflection
Assemblyinfo
Get the name of the currently executing method
Ruby
Reflection
Metaprogramming
How to dynamically load a Python class
Python
Reflection
Python Import
Can you use reflection to find the name of the currently executing method?
.Net
Reflection
Convert a python 'type' object to a string
Python
Reflection
How do I get the path of the assembly the code is in?
C#
.Net
Reflection
Mbunit
How to create a new object instance from a Type
C#
.Net
Performance
Reflection
Types
Why would finding a type's initializer throw a NullReferenceException?
.Net
Reflection
Nullreferenceexception
.Net 4.5
Typeinitializer
Java Reflection Performance
Java
Performance
Optimization
Reflection
Get properties and values from unknown object
C#
Reflection
Java array reflection: isArray vs. instanceof
Java
Arrays
Reflection
Retrieve only static fields declared in Java class
Java
Reflection
Static
Field
How can I get all constants of a type by reflection?
C#
.Net
Reflection
Constants
How To Test if Type is Primitive
C#
Reflection
Primitive Types
What is the difference between JDK dynamic proxy and CGLib?
Java
Reflection
Cglib
Dynamic Proxy
How to get a property value based on the name
C#
asp.net
Reflection
How to check whether an object has certain method/property?
C#
.Net
Methods
Reflection
Properties
What's invokedynamic and how do I use it?
Java
Reflection
Jvm
Invokedynamic
How to enumerate an object's properties in Python?
Python
Reflection
Properties
How to loop through all the properties of a class?
.Net
vb.net
Class
Reflection
Properties
Using Case/Switch and GetType to determine the object
C#
.Net
Reflection
Switch Statement
Case
How do I get the calling method name and type using reflection?
C#
Reflection
Any way to Invoke a private method?
Java
Reflection
Private
Testing if object is of generic type in C#
C#
.Net
Generics
Reflection
Types
Why is Attributes.IsDefined() missing overloads?
C#
.Net
Reflection
How do I invoke a Java method when given the method name as a string?
Java
Reflection
Invoke
Get type of a generic parameter in Java with reflection
Java
Generics
Reflection
Reflection generic get field value
Java
Reflection
At runtime, find all classes in a Java application that extend a base class
Java
Reflection
Inheritance
Purpose of Activator.CreateInstance with example?
C#
.Net
Reflection
How do I intercept a method call in C#?
C#
Reflection
Aop
How to get the list of properties of a class?
C#
.Net
Reflection
Properties
Java Reflection: How to get the name of a variable?
Java
Reflection
Retrieving the inherited attribute names/values using Java Reflection
Java
Reflection
Introspection
Can a line of Python code know its indentation nesting level?
Python
Reflection
Metaprogramming
Indentation
Tokenize
How do I check if a property exists on a dynamic anonymous type in c#?
C#
C# 4.0
Dynamic
Reflection
.Net 4.0
How to determine if a type implements an interface with C# reflection
C#
Reflection
Interface
Best way of invoking getter by reflection
Java
Reflection
Getter
How to dynamically create generic C# object using reflection?
C#
Generics
Reflection
Activator
Why can't GetType() find types when invoked through a method group delegate?
C#
Reflection
C# generic list <T> how to get the type of T?
C#
Reflection
Generic List
How do I reflect over the members of dynamic object?
C#
Dynamic
Reflection
How to solve InaccessibleObjectException ("Unable to make {member} accessible: module {A} does not 'opens {package}' to {B}") on Java 9?
Java
Reflection
Java 9
Java Module
Java Platform-Module-System
Can I obtain method parameter name using Java reflection?
Java
Reflection
Get all inherited classes of an abstract class
C#
Reflection
Inheritance
Is it possible to set private property via reflection?
.Net
Reflection
Properties
Private
Getting all types that implement an interface
C#
Optimization
Reflection
Lambda
C# 3.0
Avoiding an ambiguous match exception
C#
Reflection
Ambiguous Call
Call static method with reflection
C#
Reflection
Dynamic
What to use instead of Class.newInstance()?
Java
Reflection
Calling generic method with a type argument known only at execution time
C#
Linq
Generics
Reflection
Objective-C class -> string like: [NSArray className] -> @"NSArray"
Objective C
Reflection
Metaprogramming
Objective C-Runtime
Can you find all classes in a package using reflection?
Java
Reflection
Packages
Converting Integer to Long
Java
Reflection
Casting
Determine if code is running as part of a unit test
C#
Reflection
Nunit
Checking if a variable is defined?
Ruby
Reflection
Get generic type of class at runtime
Java
Generics
Reflection
C# getting its own class name
C#
Reflection
Determining if an Object is of primitive type
Java
Reflection
How to get a Static property with Reflection
.Net
Reflection
Static
Why do some C# lambda expressions compile to static methods?
C#
.Net
Reflection
Lambda
Finding the PHP File (at run time) where a Class was Defined
Php
Reflection
Class
Using reflect, how do you set the value of a struct field?
Go
Reflection
Go Reflect
How to get the name of a function in Go?
Go
Reflection
Go Reflect
Java reflection - impact of setAccessible(true)
Java
Reflection
range over interface{} which stores a slice
Go
Reflection
Slice
Go Reflect
Using PropertyInfo to find out the property type
C#
.Net
Reflection
Programmatic equivalent of default(Type)
C#
Reflection
Default
String replacement in java, similar to a velocity template
Java
String
Reflection
Velocity
Can I change a private readonly field in C# using reflection?
C#
Reflection
Field
Readonly
What is reflection and why is it useful?
Java
Reflection
Terminology
How can I get the list of a columns in a table for a SQLite database?
Reflection
Sqlite
List
getting type T from IEnumerable<T>
C#
Generics
Reflection
Access to private inherited fields via reflection in Java
Java
Reflection
Inheritance
Private Members
How to Load an Assembly to AppDomain with all references recursively?
C#
.Net
Reflection
Assemblies
Appdomain
Getting value of public static final field/property of a class in Java via reflection
Java
Reflection
Static
Final
Does Swift support reflection?
Ios
Reflection
Swift
Mapping object to dictionary and vice versa
C#
.Net
Dictionary
Reflection
Mapping
Is it bad practice to use Reflection in Unit testing?
Java
Unit Testing
Reflection
Getting attributes of Enum's value
C#
Reflection
Enums
.Net Attributes
How to read the value of a private field from a different class in Java?
Java
Class
Reflection
Field
Private
Change private static final field using Java reflection
Java
Reflection
Static
Private
Final
How do I check if a type provides a parameterless constructor?
C#
.Net
Reflection
Constructor
Types
Add property to anonymous type after creation
C#
Reflection
Anonymous Objects
How can I reliably determine the type of a variable that is declared using var at design time?
C#
Reflection
Appdomain
Type Inference
What are the use(s) for tags in Go?
Go
Struct
Reflection
Tags
Problem getting the AssemblyVersion into a web page using Razor /MVC3
C#
asp.net Mvc-3
Reflection
Assemblies
Razor
How to prevent ReflectionTypeLoadException when calling Assembly.GetTypes()
.Net
Reflection
Plugins
.Net Assembly
How to check if variable's type matches Type stored in a variable
C#
Reflection
Types
What is the difference between a.getClass() and A.class in Java?
Java
Class
Reflection
How can I check if a method is static using reflection?
Java
Reflection
Avoiding instanceof in Java
Java
Reflection
Polymorphism
Instanceof
Chain of-Responsibility
How to list all functions in a Python module?
Python
Reflection
Module
Inspect
Instantiating object of type parameter
Java
Generics
Reflection
Is it possible in Java to access private fields via reflection
Java
Reflection
Using C# reflection to call a constructor
C#
Reflection
Constructor
Getting the name of the currently executing method
Java
Reflection
Methods
Get list of a class' instance methods
Ruby
Reflection
Ruby 1.9.2
I want to get the type of a variable at runtime
Scala
Reflection
GetProperties() to return all properties for an interface inheritance hierarchy
C#
.Net
Reflection
C# Reflection: How to get class reference from string?
C#
Reflection
How do I read all classes from a Java package in the classpath?
Java
Reflection
Determine if a Class implements a interface in Java
Java
Reflection
Dynamically Add C# Properties at Runtime
C#
Dynamic
Reflection
Properties
Creating instance of type without default constructor in C# using reflection
C#
Reflection
Instantiation
Default Constructor
How can I evaluate C# code dynamically?
C#
Reflection
Properties
C# 2.0
Get all variable names in a class
Java
Reflection
Set private field value with reflection
Java
Reflection
How to limit setAccessible to only "legitimate" uses?
Java
Security
Reflection
How do I check if a given value is a generic list?
C#
Reflection
List
Generics
Loading DLLs at runtime in C#
C#
Reflection
Dll
What is the difference between instanceof and Class.isAssignableFrom(...)?
Java
Instanceof
Reflection
How to find all the types in an Assembly that Inherit from a Specific Type C#
C#
Reflection
Get properties in order of declaration using reflection
C#
Reflection
Properties
Getproperties
Check if a property exists in a class
C#
.Net
Reflection
How to convert a Java object (bean) to key-value pairs (and vice versa)?
Java
Reflection
Collections
Javabeans
Create objective-c class instance by name?
Objective C
Reflection
Resolve Type from Class Name in a Different Assembly
C#
.Net
Reflection
What's the difference between System.Type and System.RuntimeType in C#?
C#
Reflection
Is there something like instanceOf(Class<?> c) in Java?
Java
Reflection
Instanceof
Getting Class type from String
Java
Class
Reflection
Using reflection in C# to get properties of a nested object
C#
Reflection
Setting/getting the class properties by string name
C#
Reflection
Properties
Are private methods really safe?
Java
Reflection
Private
Access Modifiers
Get all properties which marked certain attribute
C#
Reflection
What is the C# equivalent to Java's isInstance()?
C#
Reflection
Introspection
Instanceof
How to get the MethodInfo of a Java 8 method reference?
Java
Reflection
Lambda
Java 8
'casting' with reflection
C#
Reflection
Casting
Instantiate a class object with constructor that accepts a string parameter?
Java
Html
Reflection
Constructor
How to find the child class name from base class?
C#
Reflection
Inheritance
Find type of nullable properties via reflection
C#
.Net
Reflection
Nullable
How do you create a new instance of a struct from its type at run time in Go?
Go
Reflection
Go Reflect
How to get the PropertyInfo of a specific property?
C#
Reflection
How can I get all classes within a namespace?
C#
.Net
Reflection
Namespaces
Why is it even possible to change a private member, or run a private method in C# using reflection?
C#
.Net
Reflection
Gson TypeToken with dynamic ArrayList item type
Java
Reflection
Arraylist
Gson
How do I find out what type each object is in a ArrayList<Object>?
Java
Generics
Reflection
Arraylist
Copy all values from fields in one class to another through reflection
Java
Reflection
Get by reflection properties of class ,but not from inherited class
C#
Reflection
How does this Java code snippet work? (String pool and reflection)
Java
String
Reflection
String Pool
Get properties of a class
Typescript
Reflection
Using IsAssignableFrom with 'open' generic types
C#
Generics
Reflection
Types
Get property value from C# dynamic object by string (reflection?)
C#
Reflection
.Net 4.0
Correct Way to Load Assembly, Find Class and Call Run() Method
C#
.Net
Reflection
Java - Get a list of all Classes loaded in the JVM
Java
Reflection
Jvm
Open Source Alternatives to Reflector?
.Net
Reflection
Open Source
Reflector
Java reflection get all private fields
Java
Reflection
Field
Private
Python: changing methods and attributes at runtime
Python
Reflection
Runtime
How to access internal class using Reflection
C#
Reflection
Class
Internal
Java: accessing private constructor with type parameters
Java
Reflection
Constructor
Private
Reflection to Identify Extension Methods
C#
Reflection
Extension Methods
Why is reflection called reflection instead of introspection?
Language Agnostic
Reflection
How can I get generic Type from a string representation?
C#
Reflection
Types
How do I instantiate a class given its string name?
C#
Reflection
Polymorphism
How to check if object is an array of a certain type?
C#
.Net
Arrays
Reflection
Types
NoSuchFieldException when field exists
Java
Reflection
How does WCF deserialization instantiate objects without calling a constructor?
C#
.Net
Wcf
Reflection
Serialization
What is the "cost" of .NET reflection?
C#
.Net
Optimization
Reflection
Objective-C Introspection/Reflection
Objective C
Cocoa
Xcode
Reflection
Introspection
Is a Java string really immutable?
Java
String
Reflection
Immutability
Java Reflection: How can I get the all getter methods of a java class and invoke them
Java
Reflection
How to use Reflection to Invoke an Overloaded Method in .NET
.Net
Reflection
.Net 2.0
Invoke
Overloading
From base class in C#, get derived type?
C#
Reflection
Inheritance
Types
Printing all variables value from a class
Java
Reflection
How to determine by reflection if a Method returns 'void'
Java
Reflection
Methods
Java Reflection: Create an implementing class
Java
Reflection
Interface
How to have Java method return generic list of any type?
Java
List
Generics
Reflection
Casting
Test if object implements interface
C#
Reflection
Interface
Most efficient way to get default constructor of a Type
C#
.Net
Reflection
How slow is Reflection
C#
Performance
Reflection
Assemblies
Read the value of an attribute of a method
C#
.Net
Reflection
Attributes
Methods
How to know if a PropertyInfo is a collection
C#
Reflection
How do I get the Array Item Type from Array Type in .net
.Net
Reflection
Types
Is it possible to dynamically load a library at runtime from an Android application?
Android
Reflection
Classloader
Dalvik
Android Library
Get list of fields with annotation, by using reflection
Java
Reflection
Annotations
Get class name of object as string in Swift
Swift
Reflection
Typeof
Get the name of the current method
.Net
vb.net
Reflection
Get all fields (even private and inherited) from class
Java
Reflection
How do I programmatically compile and instantiate a Java class?
Java
Reflection
Dynamic Loading
How can I get a list of all classes within current module in Python?
Python
Reflection
Inspect
How to load Classes at runtime from a folder or JAR?
Java
Class
Reflection
Jar
Load
How to find all the classes which implement a given interface?
C#
Reflection
How do I check if a type is a subtype OR the type of an object?
C#
Reflection
Types
Subclass
How To Test if a Type is Anonymous?
C#
Reflection
Anonymous Types
How to get the fields in an Object via reflection?
Java
Reflection
Find Types in All Assemblies
C#
.Net
asp.net
Reflection
Types
Set object property using reflection
C#
.Net
Reflection
Properties
Reconstruct / get source code of a PHP function
Php
Reflection
Change Attribute's parameter at runtime
C#
Reflection
Attributes
Dumping a java object's properties
Java
Reflection
Properties
Dump
Tostring
Using GetProperties() with BindingFlags.DeclaredOnly in .NET Reflection
C#
.Net
Reflection
How do I get the member to which my custom attribute was applied?
C#
Reflection
Attributes
Custom Errors
What is the difference between getDeclaredConstructors and getConstructors in the Class API?
Java
Reflection
Constructor
How to create an instance of an annotation
Java
Reflection
Annotations
How to read assembly attributes
.Net
Reflection
Assemblies
Attributes
C#: How to get all public (both get and set) string properties of a type
C#
Reflection
How to get the value of private field using reflection?
C#
Reflection
How to check if property setter is public
C#
.Net
Reflection
How to use getMethod() with primitive types?
Java
Reflection
How do I use reflection to invoke a private method?
C#
.Net
Reflection
Private Methods
How to instantiate an inner class with reflection in Java?
Java
Reflection
Instantiationexception
Retrieving the calling method name from within a method
C#
Reflection
Methods
Calling Convention
Why does C++ not have reflection?
C++
Reflection
Programmatically get Summary comments at runtime
C#
asp.net
Reflection
Documentation
Creating an instance using the class name and calling constructor
Java
Reflection
Instantiation
How does Rust implement reflection?
Reflection
Rust
How to get the numeric value from the Enum?
C#
.Net
Reflection
Properties
Enums
How to get annotations of a member variable?
Java
Reflection
Annotations
Beaninfo
Casting a variable using a Type variable
C#
Reflection
Types
Java how to call method by reflection with primitive types as arguments
Java
Reflection
.NET - Get default value for a reflected PropertyInfo
C#
.Net
Reflection
What could cause java.lang.reflect.InvocationTargetException?
Java
Exception
Reflection
Invoke
How do I use reflection to determine the nested type (element type) of an array?
C#
.Net
Reflection
How could Reflection not lead to code smells?
Reflection
How do I invoke a private static method using reflection (Java)?
Java
Reflection
Invoke
Is there any way to set a private/protected static property using reflection classes?
Php
Reflection
Visibility
Get all types implementing specific open generic type
C#
Generics
Reflection
Open Generics
How to await an async private method invoked using reflection in WinRT?
C#
Reflection
Windows Runtime
Async Await
Loop through an object's properties and get the values for those of type DateTime
C#
.Net
Reflection
Java introspection and reflection
Java
Reflection
Introspection
How to find out if a field is instanceof a type via reflection?
Java
Reflection
Find methods that have custom attribute using reflection
C#
Reflection
Custom Attributes
Check if a class is derived from a generic class
C#
Generics
Reflection
How to hide public methods from IntelliSense
C#
.Net
Reflection
Intellisense
Encapsulation
Faster alternatives to Java's reflection
Java
Performance
Reflection
Setting a property by reflection with a string value
C#
Reflection
Type Conversion
Propertyinfo
Setvalue
Getting the size of a field in bytes with C#
C#
Reflection
Byte
ClassCastException when casting to the same class
Java
Reflection
Classcastexception
Websphere Portal
Invoking methods with optional parameters through reflection
C#
.Net
Reflection
Invoke
Default Value
Detect if a method was overridden using Reflection (C#)
C#
Reflection
Overriding
Can you get a Func<T> (or similar) from a MethodInfo object?
.Net
Performance
Reflection
Methodinfo
Func
How to get the current product version in C#?
C#
Reflection
Can a Java class add a method to itself at runtime?
Java
Reflection
Code Generation
Javassist
Modify a class definition's annotation string parameter at runtime
Java
Reflection
Call and Callvirt
.Net
Reflection
Cil
reflection.emit
Python decorator makes function forget that it belongs to a class
Python
Reflection
Metaprogramming
How to convert string to any type
C#
Generics
Reflection
How to tell if a JavaScript function is defined
Javascript
Reflection
Convert.ChangeType() fails on Nullable Types
C#
.Net
Reflection
How can I evaluate a C# expression dynamically?
C#
Reflection
Eval
Can I get the signature of a C# delegate by its type?
C#
Reflection
Delegates
Why is the use of reflection in .NET recommended?
C#
.Net
Reflection
How to get function parameter names/values dynamically?
Javascript
Reflection
Function Parameter
What are the implications of asking Reflection APIs to overwrite System.String.Empty?
C#
.Net
Reflection
Accessing non-visible classes with reflection
Java
Class
Reflection
Package Private
Can Java class files use reserved keywords as names?
Java
Reflection
Jvm
.Class File
PHP 5 Reflection API performance
Php
Performance
Reflection
How to call generic method with a given Type object?
C#
.Net
Generics
Reflection
Types
What is the difference between introspection and reflection?
Reflection
Language Agnostic
Introspection
For an object, can I get all its subclasses using reflection or other ways?
C#
.Net
Inheritance
Reflection
Instancing a class with an internal constructor
C#
.Net
Reflection
Finding property differences between two C# objects
C#
.Net
Reflection
Auditing