Top "Introspection" questions

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

How to get method parameter names?

Given the Python function: def a_method(arg1, arg2): pass How can I extract the number and names of the …

python decorator introspection python-datamodel
How to get the caller's method name in the called method?

Python: How to get the caller's method name in the called method? Assume I have 2 methods: def method1(self): ... a = …

python introspection
How can I get the name of an object in Python?

Is there any way to get the name of an object in Python? For instance: my_list = [x, y, z] # …

python introspection
Using isKindOfClass with Swift

I'm trying to pick up a bit of Swift lang and I'm wondering how to convert the following Objective-C into …

ios swift reflection introspection
Get model's fields in Django

Given a Django model, I'm trying to list all of its fields. I've seen some examples of doing this using …

django django-models introspection metamodel
Get Activity name dynamically - android

I'd like to get the name of the current Activity to be sent along in the URI of an HttpRequest. …

android android-activity introspection
List all the modules that are part of a python package?

Is there a straightforward way to find all the modules that are part of a python package? I've found this …

python module packages introspection python-import
Retrieving the inherited attribute names/values using Java Reflection

I've a Java object 'ChildObj' which is extended from 'ParentObj'. Now, if it is possible to retrieve all the attribute …

java reflection introspection
What is the C# equivalent to Java's isInstance()?

I know of is and as for instanceof, but what about the reflective isInstance() method?

c# reflection introspection instanceof
List all base classes in a hierarchy of given class?

Given a class Foo (whether it is a new-style class or not), how do you generate all the base classes …

python class inheritance oop introspection