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

Method prettyPrintString

commands/FBClassDump.py:404–430  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

402
403 # https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW1
404 def prettyPrintString(self):
405 attrs = []
406 if self.attributes.has_key("N"):
407 attrs.append("nonatomic")
408 else:
409 attrs.append("atomic")
410
411 if self.attributes.has_key("&"):
412 attrs.append("strong")
413 elif self.attributes.has_key("C"):
414 attrs.append("copy")
415 elif self.attributes.has_key("W"):
416 attrs.append("weak")
417 else:
418 attrs.append("assign")
419
420 if self.attributes.has_key("R"):
421 attrs.append("readonly")
422
423 if self.attributes.has_key("G"):
424 attrs.append("getter={}".format(self.attributes["G"]))
425 if self.attributes.has_key("S"):
426 attrs.append("setter={}".format(self.attributes["S"]))
427
428 return "@property ({}) {} {};".format(
429 ", ".join(attrs), decode(self.attributes["T"]), self.name
430 )

Callers

nothing calls this directly

Calls 1

decodeFunction · 0.85

Tested by

no test coverage detected