0 votes
15 views

Reflection? Class Introspection? is there anything in objc and cocoa?

in Technology by (189k points)

1 Answer

0 votes

Class Introspection: It is the ability to provide information about objects/classes at runtime . Objective C runtime supports introspection. A small sample of the type of information provided by the objC runtime

  1. names of methods of class from a class object.

2) information about method arguments

3) implementation(IMP) of individual methods of a class

4) Information about instance variables of a class

Reflection: Its the ability to add new classes and to add/modify interfaces of existing classes. It also includes the ability to modify the relationship between classes For example, the objC runtime allows new classes to be added, methods to be added to a class and instance variables to be added to a class created at runtime. It also allows the superclass of a class to be replaced by another class.

Swizzling: The term “Swizzling” in objective C refers to exchanging the implementation of two methods(class or instance) at runtime. So you apply introspection to access method implementations and reflection to actually exchange the method implementation to achieve swizzling.

by (189k points)

Related questions

0 votes
1 answer 10 views
0 votes
1 answer 14 views
0 votes
1 answer 10 views
0 votes
1 answer 14 views
0 votes
1 answer 14 views
0 votes
1 answer 11 views
0 votes
1 answer 13 views
13 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 10 views
10 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 9 views
9 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 16 views
16 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 15 views
15 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 12 views
12 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 10 views
10 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 13 views
13 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 15 views
15 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 11 views
11 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 12 views
12 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 11 views
11 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 10 views
10 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 24 views
0 votes
1 answer 10 views
10 views asked Nov 10, 2020 in Technology by JackTerrance (189k points)
...