Skip to content

Small project allowing to get all necessary information about properties easily and quickly

Notifications You must be signed in to change notification settings

literator/MOPropertyAnalyzer

Repository files navigation

Property Analyzer

It's a small project that allow to get all necessary information about properties of given class. Easy and simple tool ready to use. Just copy MOPropertyAnalyzer folder to destination project.

Example

MOPropertyAnalyzer *propertyAnalyzer = [MOPropertyAnalyzer analyzerWithClass:[MyObject class]];
MOPropertyDescriptor *descriptor = [propertyAnalyzer descriptorForPropertyName:@"complexRatio"];

NSAssert(descriptor.isPrimitive, @"It should be primitive type.");
NSAssert(descriptor.isReadonly, @"It should be readonly type.");
...

NSArray *propertyDescriptors = propertyAnalyzer.propertyDescriptors;
for (MOPropertyDescriptor *descriptor in propertyDescriptors) {
    NSLog(@"Property class name = %@", descriptor.className ?: @"No class name");
}

TODO

  • Get struct, union details

Feedback

If you have some good thoughts, you want to contribute or give me an advice, please do. Contact me, create an issue or PR.

License

MIT

About

Small project allowing to get all necessary information about properties easily and quickly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published