Resolve an identifier which may be the binary name of a class or
the Java name of a class or package.
@param name      The name to resolve
169966
public Symbol resolveBinaryNameOrIdent(String name) {
        ModuleSymbol msym;
        String typeName;
        int sep = name.indexOf('/');
        if (sep == -1) {
            msym = modules.getDefaultModule();
            typeName = name;
        } else if (source.allowModules()) {
            Name modName = names.fromString(name.substring(0, sep));

            msym = moduleFinder.findModule(modName);
            typeName = name.substring(sep + 1);
        } else {
            log.error(Errors.InvalidModuleSpecifier(name));
            return silentFail;
        }

        return resolveBinaryNameOrIdent(msym, typeName);
    }
757255
public KeyValueNode<String> getAdditionalPublicanCfgNode(final String name) {
        return !publicanCfgs.containsKey(name) ? null : publicanCfgs.get(name);
    }
1341202
public void setRegistrationName(String name) {
    NamespaceService[] nsos = namespaceManager.getAllNamenodeThreads();
    for (NamespaceService ns : nsos) {
      ((NSOfferService) ns).setRegistrationName(name);
    }
  }
619804
public ResolvedType findBoundType(String name) {
        for (int i = 0, len = _names.length; i < len; ++i) {
            if (name.equals(_names[i])) {
                return _types[i];
            }
        }
        return null;
    }
328830
public static PPrimitive findByName(String name) {
        switch (name) {
            case "void":
                return VOID;
            case "bool":
                return BOOL;
            case "byte":
            case "i8":
                return BYTE;
            case "i16":
                return I16;
            case "i32":
                return I32;
            case "i64":
                return I64;
            case "double":
                return DOUBLE;
            case "string":
                return STRING;
            case "binary":
                return BINARY;
        }
        return null;
    }
50654
private static Class resolveRClass(String packageName) {
        do {
            try {
                return Class.forName(packageName + ".R$string");
            } catch (ClassNotFoundException e) {
                packageName = packageName.contains(".") ? packageName.substring(0, packageName.lastIndexOf('.')) : "";
            }
        } while (!TextUtils.isEmpty(packageName));

        return null;
    }
71777
@Override
    protected Class<?> resolveProxyClass(String[] interfaceNames) throws ClassNotFoundException {
        ClassLoader proxyClassLoader = classLoader;
        Class<?>[] interfaces = new Class[interfaceNames.length];
        Class<?> nonPublicInterface = null;

        for (int i = 0; i < interfaceNames.length; i++) {
            Class<?> intf = loadClass(interfaceNames[i]);

            if (!Modifier.isPublic(intf.getModifiers())) {
                ClassLoader classLoader = getClassLoader(intf);
                if (nonPublicInterface != null) {
                    if (classLoader != proxyClassLoader) {
                        throw new IllegalAccessError(nonPublicInterface + " and " + intf + " both declared non-public in different class loaders");
                    }
                } else {
                    nonPublicInterface = intf;
                    proxyClassLoader = classLoader;
                }
            }

            interfaces[i] = intf;
        }

        try {
            return Proxy.getProxyClass(proxyClassLoader, interfaces);
        } catch (IllegalArgumentException ex) {
            throw new ClassNotFoundException(null, ex);
        }
    }
677914
public Symbol resolveBinaryNameOrIdent(ModuleSymbol msym, String name) {
        try {
            Name flatname = names.fromString(name.replace("/", "."));
            return finder.loadClass(msym, flatname);
        } catch (CompletionFailure ignore) {
            return resolveIdent(msym, name);
        }
    }
1340402
public static ObjectIdentifier getOID(String name) {
        OIDInfo info = nameMap.get(name);
        return (info == null) ? null : info.oid;
    }
659831
private Class<?> resolveClassWithCL(String name) throws ClassNotFoundException {
        SecurityManager security = System.getSecurityManager();
        if (security != null) {
            return Class.forName(name, false, getClassLoader(thisClass));
        }

        // The platform classloader is null if we failed to get it when using java 9, or if we are
        // running with a java level below 9. In those cases, the bootstrap classloader
        // is used to resolve the needed class.
        // Note that this change is being made to account for the fact that in java 9, classes
        // such as java.sql.* (java.sql module) are no longer discoverable through the bootstrap
        // classloader. Those classes are now discoverable through the java 9 platform classloader.
        // The platform classloader is between the bootstrap classloader and the app classloader.
        return Class.forName(name, false, platformClassloader);
    }
228945
private static int getIdentifier(Context context, String type, String key) {
    return context.getResources().getIdentifier(key, type, context.getPackageName());
  }
471528
final int resolveNameIndex(CharSequence name)
    {
        int size = 0;
        int index = 0;
        constantReadLock.lock();
        try
        {
            size = getConstantPoolSize();
            index = getNameIndex(name);
        }
        finally
        {
            constantReadLock.unlock();
        }
        if (index != -1)
        {
            return index;
        }
        else
        {
            return addConstantInfo(new Utf8(name), size);
        }
    }
520128
public static boolean isClass(String name)
  {
    if(name == null) {
      return false;
    }
    Matcher matcher = CLASS_NAME_PATTERN.matcher(name);
    return matcher.find();
  }
1372190
function toBindingIdentifierName(name) {
  name = toIdentifier(name);
  if (name === "eval" || name === "arguments") name = "_" + name;
  return name;
}
13633
private static boolean isClassOrConstantName(String name) {
    return name != null && name.length() > 1 && Character.isUpperCase(name.charAt(0));
  }
212352
@Ensures("result == isQualifiedName(name.replace('/', '.'))")
  public static boolean isBinaryName(String name) {
    if (name == null || name.isEmpty()) {
      return false;
    }
    String[] parts = name.split("/");
    for (String part : parts) {
      if (!isSimpleName(part)) {
        return false;
      }
    }
    return true;
  }
171766
@Override
  public Class<?> loadClassImpl(String name, boolean resolve)
    throws ClassNotFoundException
  {
    // The JVM has already cached the classes, so we don't need to
    Class<?> cl = findLoadedClass(name);

    if (cl != null) {
      if (resolve)
        resolveClass(cl);
      return cl;
    }
    // System.out.println("ROOT: " + name);
    if (_classNotFoundCache.get(name) != null) {
      return null;
    }
    
    try {
      cl = super.loadClassImpl(name, resolve);
    } catch (ClassNotFoundException e) {
      _classNotFoundCache.put(name, name);
      
      throw e;
    }
    
    if (cl == null) {
      _classNotFoundCache.put(name, name);
    }
    
    return cl;
  }