def lazyGet(self, map, key): if not key.startswith("Titanium") and map != self.topLevel: key = "Titanium.%s" % key key = mappings.mapType(key) if key not in map: map[key] = { "properties": {}, "functions": {} } return map[key]
def getComponentNameForAPI(self, component, api): # Walk the android bindings (our best data set?) to see where an api is originally defined component = mappings.mapType(component) for binding in self.androidBindings: for proxyClass in binding["proxies"].keys(): proxy = binding["proxies"][proxyClass] apiName = self.getProxyAPIName(proxy) if apiName == component: # try to find an API point in the component itself first if self.proxyHasAPI(proxy, api): return component elif "superProxyBindingClassName" in proxy: superProxy = self.findSuperProxyBinding(proxy) while superProxy != None: superAPIName = self.getProxyAPIName(superProxy) if self.proxyHasAPI(superProxy, api): return superAPIName if "superProxyBindingClassName" not in superProxy: return None superProxy = self.findSuperProxyBinding(superProxy) return None
def getProxyAPIName(self, proxy): apiName = proxy["proxyAttrs"]["fullAPIName"] if not apiName.startswith("Titanium"): apiName = "Titanium." + apiName return mappings.mapType(apiName)