Joy Online Manual

NAME
objc:info - Get information about the Objective-C runtime

SYNOPSIS

objc:info option ?arg ...?

DESCRIPTION
Returns one of several informations about the state of the Objective-C runtime system, depending on the given option. The legal options (which may be abbreviated) are:

objc:info args object ?+|-? selector

Returns the names of the arguments of the most recent Joy implementation of the selector given for object. An optional plus or minus sign allows to distinguish between class methods and instance methods (default is -).

objc:info body object ?+|-? selector

Returns the full source code of the most recent Joy implementation of the selector given for object. An optional plus or minus sign allows to distinguish between class methods and instance methods (default is -).

objc:info classes ?-all? ?-subclassof class? ?pattern?

Returns a list of all class names known to the Objective-C run-time environment. The optional glob-style pattern may be specified to return only those class names that match pattern. If -subclassof is specified only subclasses of class are returned, including indirect subclasses if -all is given.

objc:info ids ?-all? ?-class? ?-instanceof class? ?pattern?

Returns a list of all instance objects known to the Joy interpreter. The optional glob-style pattern may be specified to return only those ids that match pattern. If -instanceof is specified, only members of class are returned, including indirect members if -all is given.

If -class is given, a list of all class and metaclass objects will be returned instead.

If the global variable objc:idCheckingEnabled is not 0, instance objects can become known to the Joy interpreter through either of the following events:

The object is returned to Joy from any Objective-C method or C function.
The object is passed as an argument to any Joy skill from Objective-C.
The object is the target of a pointer that is dereferenced using objc:peek -trust.
The object is passed from C code to the API function ItkObjC_RegisterId or to one of the conversion functions with the ItkObjCRegisterId flag set.
The object is allocated by the runtime and the global variable objc:idCheckingEnabled is 2.

objc:info ivars ?-all? ?-class? object ?pattern?

Returns a list of the given object's instance or class variables. If -all is given, variables inherited from ancestor classes will be included in the list; if -class is given, class variables are returned, else instance variables. The optional glob-style pattern may be specified to return only those variable names that match pattern.

objc:info macros ?pattern?

Returns a list of the names of all defined macro constants. The optional glob-style pattern may be specified to return only those macro names that match pattern.

objc:info methods ?-all? ?-class? object ?pattern?
objc:info methods ?-all? ?-class? -protocol protocol ?pattern?

Returns a list of the instance or class methods of the given object or the given protocol if  -protocol is specified. If -all is given, methods inherited from ancestor classes will be included in the list; if -class is given, class methods are returned, else instance methods. The optional glob-style pattern may be specified to return only methods whose selectors match pattern. Each element of the returned list is a list where the first element is the return type, the second is the name of the selector and the remaining elements are the argument types.

objc:info protocols ?-all? object ?pattern?
objc:info protocols ?-all? -protocol protocol ?pattern?

Returns a list of the names of all protocols that match the optional glob-style pattern. If either object or protocol is given, it returns only those which are adopted by the class or object object or the protocol protocol.  If -all is given, protocols adopted indirectly (by a superclass or adopted protocols) are also included in the list.

objc:info typedefs ?pattern?

Returns a list of the names of all defined typedef definitions. The optional glob-style pattern may be specified to return only those typedef names that match pattern.

objc:info version

Returns the version number of the underlying ITK (Integration Tool Kit) framework.

SEE ALSO

objc:define
objc:loadMacros
objc:newProtocol
objc:protocol
objc:teach
objc:typedef
objc:undef
objc:unteach

KEYWORDS
arguments, body, class, instance variable, macro, object, protocol, runtime, type, version

Index