In that case, all I can think of is parsing all the project the .m files,
finding the method implementation and storing what string is declared within
the parens.
Build the table before compilation or at, store it in plists for each class and
read the plist for each class to determine the expec
I'm surely speaking from ignorance here, but could one extend the runtime to
store a table (NSSet?) of class methods and then at an appropriate event,
either parse all the source (lame, I know) or access a class method table from
the runtime?
Check out "Name angling in Objective-C" on Wikipedia
On Mon, Feb 23, 2015, at 12:18 AM, Maxthon Chan wrote:
> In Objective-C, methods are called my sending messages, and message
> selectors are not bounded to a class.
>
> You can walk all loaded classes and try to work out the classes that
> responds to the message selector in question, but beware c
In Objective-C, methods are called my sending messages, and message selectors
are not bounded to a class.
You can walk all loaded classes and try to work out the classes that responds
to the message selector in question, but beware classes that descended from the
old Object class (not NSObject
On Feb 22, 2015, at 3:01 PM, Jack Brindle wrote:
> Doesn’t [self class] do this? The method is within whatever self is, so it
> seems appropriate that [self class]
> would provide what you want.
Although the subject wasn't clear, the body makes it clear he's looking for the
return type of a me
That's the class of the current instance.
I think the poster wants this: "I have this method. What's its class?"
On Feb 22, 2015, at 4:01 PM, Jack Brindle wrote:
> Doesn’t [self class] do this? The method is within whatever self is, so it
> seems appropriate that [self class]
> would provide
Doesn’t [self class] do this? The method is within whatever self is, so it
seems appropriate that [self class]
would provide what you want.
- Jack
> On Feb 22, 2015, at 4:41 AM, BareFeetWare
> wrote:
>
> Hi all,
>
> How can I get the class of a method, at runtime?
>
> I can get the name of
On Sun, Feb 22, 2015, at 12:11 PM, Jens Alfke wrote:
>
> > On Feb 22, 2015, at 9:30 AM, Kyle Sluder wrote:
> >
> > The compiler does keep type info for properties, but that’s not actually
> > documented.
>
> It’s documented in the “Declared Properties” section of the “Objective-C
> Runtime Pro
> On Feb 22, 2015, at 9:30 AM, Kyle Sluder wrote:
>
> The compiler does keep type info for properties, but that’s not actually
> documented.
It’s documented in the “Declared Properties” section of the “Objective-C
Runtime Programming Guide”:
You can use the property_getAttributes fun
> On Feb 22, 2015, at 4:41 AM, BareFeetWare
> wrote:
>
> However, the returnType is just a char that is set to "@" for all classes. I
> want to know which class is returned.
The compiler does not preserve this information. It also does not preserve the
static types of method arguments.
The c
Hi all,
How can I get the class of a method, at runtime?
I can get the name of the class methods via:
Method *methods =
class_copyMethodList(objc_getMetaClass([NSStringFromClass([self class])
UTF8String]), &methodCount);
for (int i = 0; i < methodCount; i++) {
Method method = m
11 matches
Mail list logo