(arg, is_classname)
| 209 | |
| 210 | |
| 211 | def getClassFromArgument(arg, is_classname): |
| 212 | cls = arg |
| 213 | if is_classname: |
| 214 | cls = runtimeHelpers.objc_getClass(cls) |
| 215 | if not int(cls, 16): |
| 216 | raise Exception('Class "{}" not found'.format(arg)) |
| 217 | else: |
| 218 | if not isClassObject(cls): |
| 219 | cls = runtimeHelpers.object_getClass(cls) |
| 220 | if not isClassObject(cls): |
| 221 | raise Exception( |
| 222 | "Invalid argument. Please specify an instance or a Class." |
| 223 | ) |
| 224 | |
| 225 | return cls |
| 226 | |
| 227 | |
| 228 | def printInstanceMethods(cls, showaddr=False, prefix="-"): |
no test coverage detected