MCPcopy Create free account
hub / github.com/facebook/chisel / getClassFromArgument

Function getClassFromArgument

commands/FBClassDump.py:211–225  ·  view source on GitHub ↗
(arg, is_classname)

Source from the content-addressed store, hash-verified

209
210
211def 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
228def printInstanceMethods(cls, showaddr=False, prefix="-"):

Callers 2

runMethod · 0.85
runMethod · 0.85

Calls 1

isClassObjectFunction · 0.85

Tested by

no test coverage detected