Retrieves the parent class name if using STI.
768516
def parent_class_name(obj)
      unless DEFAULT_PARENTS.include? obj.class.superclass
        return obj.class.base_class.name
      end

      obj.class.name
    end
28865
def get_parent_data(tree, node, current):
        
        if not current:
            current = []

        parent = tree.parent(node.identifier)
        if parent.is_root():
            return current

        current.insert(0, (parent.tag, parent.data))
        return PlateManager.get_parent_data(tree, parent, current)
742824
def parent(self):
        """"""
        path = '/'.join(self.path.split('/')[:-1])
        s = path.strip('/').split(':')
        if len(s)==2 and s[1]=='':
            return None
        else:
            return self.__class__(self, path=path)
1251255
def get_parent(self):
        """"""
        return None if self.zoom == 0 else self.tile_pyramid.tile(
            self.zoom - 1, self.row // 2, self.col // 2
        )
37236
def parent(self):
        """"""
        if self._parent is None:
            if self.pid is not None:
                self._parent = self.api._load_directory(self.pid)
        return self._parent
801878
def full_parent_name(self):
        
        entries = []
        command = self
        while command.parent is not None:
            command = command.parent
            entries.append(command.name)

        return ' '.join(reversed(entries))
38504
public static Class getGenericClassFromParent(Object parent) {
		return (Class) ((ParameterizedType) parent.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
	}
173127
def _lookup_parent(self, cls):
        """"""
        codeobj = self.parent
        while codeobj is not None and not isinstance(codeobj, cls):
            codeobj = codeobj.parent
        return codeobj
974486
def parent(self):
        
        try:
            return Resource(self['parent_type'], uuid=self['parent_uuid'], check=True)
        except KeyError:
            raise ResourceMissing('%s has no parent resource' % self)
467018
public function getParentClass()
    {
        $parentClass = parent::getParentClass();
        return ($parentClass === false) ? false : new ClassReflection($parentClass->getName());
    }
883223
private String getNamingContextName() {    	
	    if (namingContextName == null) {
			Container parent = getParent();
			if (parent == null) {
				namingContextName = getName();
			} else {
				Stack<String> stk = new Stack<String>();
				StringBuffer buff = new StringBuffer();
				while (parent != null) {
					stk.push(parent.getName());
					parent = parent.getParent();
				}
				while (!stk.empty()) {
					buff.append("/" + stk.pop());
				}
				buff.append(getName());
				namingContextName = buff.toString();
			}
		}
		return namingContextName;
    }
1288598
protected function determineParentObj()
    {
        $parent = $this->parentIdentifier;
        $parentPage = SiteTree::get()->byID((int) $parent);
        if (!$parentPage) {
            $parentPage = SiteTree::get_by_link($parent);
        }
        if (!$parentPage) {
            $parentPage = SiteTree::get()->filter(array('Title' => trim($parent)))->first();
        }
        if (!$parentPage) {
            throw new Exception("Could not find a page with ID, URLSegment, or Title \"$parent\"");
        }
        if (!Injector::inst()->get($this->subjectClass)->hasField($this->parentField)) {
            throw new Exception("{$this->subjectClass} has no field {$this->parentField}.");
        }

        $this->parentObj = $parentPage;
        $this->log("Parent page is #{$parentPage->ID} {$parentPage->getTitle()}");
    }
198863
protected function getShopParentClass()
    {
        $className = get_class($this); //actual class, might be shop class chain extended by module
        while ($className && !\OxidEsales\Eshop\Core\NamespaceInformationProvider::classBelongsToShopUnifiedNamespace($className)) {
            $className = get_parent_class($className);
        }
        return $className;
    }
454425
def get_named_parent(decl):
    

    if not decl:
        return None

    parent = decl.parent
    while parent and (not parent.name or parent.name == '::'):
        parent = parent.parent
    return parent
1277319
def parent(self):
        # type: () -> Any
        
        if self.parent_id:
            return self._client.part(pk=self.parent_id, category=self.category)
        else:
            return None
854802
def semantic_parent(self):
        """"""
        if not hasattr(self, '_semantic_parent'):
            self._semantic_parent = conf.lib.clang_getCursorSemanticParent(self)

        return self._semantic_parent
1106857
def view_class2(self, fatherid=''):
        '''
        
        '''

        if self.is_admin():
            pass
        else:
            return False

        kwd = {'class1str': self.format_class2(fatherid),
               'parentid': '0',
               'parentlist': MCategory.get_parent_list()}

        if fatherid.endswith('00'):
            self.render('misc/publish/publish2.html',
                        userinfo=self.userinfo,
                        kwd=kwd)
        else:
            catinfo = MCategory.get_by_uid(fatherid)
            self.redirect('/{1}/_cat_add/{0}'.format(fatherid, router_post[catinfo.kind]))