in Technology by

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

1 Answer

0 votes
by

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.

Related questions

0 votes
    I am beginner for the cocos2d, but thought that cocos2d derived from the openGL. Actually I am having basic ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 17, 2022 in Education by JackTerrance
0 votes
    What is used to get class name in reflection? (a) getClass().getName() (b) getClass().getFields() (c) getClass( ... , JSP & API of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    How to get the class object of associated class using Reflection? (a) Class.forName( className ) (b) Class.name( ... JSP & API of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    What is used to get class name in reflection? (a) getClass().getName() (b) getClass().getFields( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    How to get the class object of associated class using Reflection? (a) Class.forName( className ) (b) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    When I've registered an object foo to receive KVO notifications from another object bar (using addObserver:. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    Using the Apple OS X Cocoa framework, how can I post a sheet (slide-down modal dialog) on the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    I have a single window with a single custom view in it, and I want the custom view to resize ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    The ____________ is anything which your search engine cannot search. 1) Haunted web 2) World Wide Web 3) Surface web 4) Deep Web...
asked Dec 30, 2020 in Technology by JackTerrance
0 votes
    With ___________________ attack, an attacker hijacks a session but do not alter anything. They just sit back ... -Cyber Security:,Cyber Security-Jobs:,Cyber Security Applications...
asked Oct 31, 2021 in Education by JackTerrance
0 votes
    I'm trying to use node to print the Serial from Arduino uno connected to USB I have a file script ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 30, 2022 in Education by JackTerrance
0 votes
    I'm trying to make a function in c to create and return a new struct similar to a constructor in ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: JavaScript: Difference between .forEach() and .map() (15 answers) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I posted this : PHP 5.2.x: $_POST is empty when any field has value of "drop anywords from ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    It is a peripheral device which will print anything created on a computer onto a paper, whether it be text or ...  Projector  Monitor Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
...