Top "Introspection" questions

A capability of some object-oriented programming languages to determine the type of an object at runtime.

property type or class using reflection

I was wondering if it's possible to determine the class or primitive type of an Objects properties. Getting all properties …

objective-c reflection deserialization introspection
How do I list all fields of an object in Objective-C?

If I have a class, how can I list all its instance variable names? eg: @interface MyClass : NSObject { int myInt; …

objective-c class introspection objective-c-runtime
Checking Objective-C block type?

This is primarily a curiosity, I'm not really sure what's the practical use of this but here goes. Since blocks …

objective-c oop closures objective-c-blocks introspection
C++ iterate into nested struct field with boost fusion adapt_struct

Two stackoverflow answers suggest the approach using fusion adapt_struct to iterate over struct fields. The approach looks nice. However, …

c++ reflection introspection template-meta-programming boost-fusion
Python logging using a decorator

This is the first example we meet when we face with decorators. But I'm not able to realize what exactly …

python logging introspection decorator
Is it reasonable in Python to check for a specific type of exception using isinstance?

Is it reasonable in Python to catch a generic exception, then use isinstance() to detect the specific type of exception …

python exception-handling introspection dnspython
C# "is" operator - is that reflection?

A colleague asked me an interesting question today - is the C# keyword/operator "is" considered reflection? object tmp = "a …

c# .net reflection introspection typing
What is the correct way to override the __dir__ method?

This question is meant to be more about __dir__ than about numpy. I have a subclass of numpy.recarray (in …

python inheritance python-2.7 introspection