Get the package name.
503622
public final @DottedClassName
    String getPackageName() {
        int lastDot = className.lastIndexOf('.');
        if (lastDot < 0) {
            return "";
        } else {
            return className.substring(0, lastDot);
        }
    }
1274128
def package_info(self, package, abspath=True):
        """"""
        return self._call_and_parse(['info', package, '--json'],
                                    abspath=abspath)
323215
def get_random_name():
    """"""
    char_seq = []
    name_source = random.randint(1, 2**8-1)
    current_value = name_source
    while current_value > 0:
        char_offset = current_value % 26
        current_value = current_value - random.randint(1, 26)
        char_seq.append(chr(char_offset + ord('a')))
    name = ''.join(char_seq)
    assert re.match(VALID_PACKAGE_RE, name)
    return name
175287
def resolve_name(name, package):
    """"""
    if not name.startswith('.'):
        return name
    elif not package:
        raise ValueError('{!r} is not a relative name '
                         '(no leading dot)'.format(name))
    level = 0
    for character in name:
        if character != '.':
            break
        level += 1
    return _resolve_name(name[level:], package, level)
944382
def parse_package_name(self):  # type: () -> Optional[str]
        
        if not self.setup_source:
            return None
        for row in self.setup_source.split("\n"):
            simplified_row = row.replace(" ", "").replace("'", '"').strip(" \t\n")
            if "name=" in simplified_row:
                if '"' in simplified_row:
                    return simplified_row.split('"')[1]

        name = self.execute_setup_name()
        if name:
            return name

        return ""
91821
public Content getPackageName(PackageDoc packageDoc) {
        return packageDoc == null || packageDoc.name().length() == 0 ?
            defaultPackageLabel :
            getPackageLabel(packageDoc.name());
    }
96612
def get_resolved_package(self, name):
        
        pkgs = [x for x in self._resolved_packages if x.name == name]
        return pkgs[0] if pkgs else None
280624
private static int getAppVersion(Context context) {
        try {
            PackageInfo packageInfo = context.getPackageManager()
                    .getPackageInfo(context.getPackageName(), 0);
            return packageInfo.versionCode;
        } catch (NameNotFoundException e) {
            // should never happen
            throw new RuntimeException("Coult not get package name: " + e);
        }
    }
437452
def packageInfo(self):
        """"""
        url = "%s/item.pkinfo" % self.root
        params = {'f' : 'json'}
        result = self._get(url=url,
                           param_dict=params,
                           securityHandler=self._securityHandler,
                           proxy_url=self._proxy_url,
                           proxy_port=self._proxy_port,
                           out_folder=tempfile.gettempdir())
        return result
387381
def get_realnames(packages):
    
    return sorted({get_distribution(p).project_name for p in packages},
                  key=lambda n: n.lower())
180280
public String getFullyQualifiedName() {
        StringBuilder sb = new StringBuilder();
        if (packageName != null && !packageName.isEmpty()) {
            sb.append(getPackageName()).append(".");
        }

        if (outerType != null) {
            sb.append(outerType.getName()).append(".");
        }
        sb.append(getName());

        return sb.toString();
    }
769427
public static String getPackageName(Object obj)
	{
		if(obj == null)
			throw new NullPointerException("obj is null");
		return getPackageName(obj.getClass());
	}
710149
public function getComposerPackageName()
    {
        if (null === $this->packages) {
            $this->initialize();
        }

        return $this->assetType->formatComposerName($this->packageName);
    }
1234853
String packageName() {
    for (Object context : contextStack) {
      if (context instanceof ProtoFile) return ((ProtoFile) context).packageName();
    }
    return null;
  }
1053957
function getPackageDefinition(packageName) {
  var def = PACKAGE_DEFINITIONS[packageName];
  if (!def) {
    warn('Cannot find package ' + packageName + '!');
    warn('Exiting...');
    process.exit();
  }
  return def;
}
873766
def getClassInPackageFromName(className, pkg):
    
    # TODO: more efficiency!
    n = getAvClassNamesInPackage(pkg)
    i = n.index(className)
    c = getAvailableClassesInPackage(pkg)
    return c[i]
714293
def get_package_data(name, extlist):
    """"""
    flist = []
    # Workaround to replace os.path.relpath (not available until Python 2.6):
    offset = len(name)+len(os.pathsep)
    for dirpath, _dirnames, filenames in os.walk(name):
        for fname in filenames:
            if not fname.startswith('.') and osp.splitext(fname)[1] in extlist:
                flist.append(osp.join(dirpath, fname)[offset:])
    return flist