Returns the matching JClass.
557008
public JClass forName(String name)
  {
    SoftReference<JClass> jClassRef = _classMap.get(name);

    JClass jClass = jClassRef != null ? jClassRef.get() : null;

    if (jClass == null) {
      jClass = _staticClassMap.get(name);

      if (jClass == null) {
        if (name.startsWith("[")) {
          JClass subClass = descriptorToClass(name, 1);
          jClass = new JClassArray(subClass);
        }
        else
          jClass = loadClass(name);
      }
      
      _classMap.put(name, new SoftReference<JClass>(jClass));
    }

    return jClass;
  }
995627
public static String getLoadableName( TypeDeclaration jclass )
    {
        TypeDeclaration containingClass = jclass.getDeclaringType();
        
        if ( containingClass == null )
        {
            return jclass.getQualifiedName();
        }
        else
        {
            return getLoadableName( containingClass ) + '$' + jclass.getSimpleName();
        }
    }
1347698
protected JClass loadClass(String name)
  {
    try {
      Class cl;

      if (_loader != null)
        cl = Class.forName(name, false, _loader);
      else
        cl = Class.forName(name);

      return new JClassWrapper(cl, this);
    } catch (ClassNotFoundException e) {
      log.log(Level.FINE, e.toString(), e);

      return null;
    }
  }
317433
def extract_class(jar, name):
    

    with jar.open(name) as entry:
        return LinkableClass(javatools.unpack_class(entry))
199550
def _class(self):
        """"""
        try:
            self._project_name()
        except ValueError:
            return MalformedReq
        if self._is_satisfied():
            return SatisfiedReq
        if not self._expected_hashes():
            return MissingReq
        if self._actual_hash() not in self._expected_hashes():
            return MismatchedReq
        return InstallableReq
1105967
def get_topclasses(cls):
    """"""
    bases = [c for c in inspect.getmro(cls)
             if c.__module__.startswith('pycbc') and c != cls]
    return ', '.join(['{}.{}'.format(c.__module__, c.__name__) for c in bases])
274545
@Override
	public Class<?> getColumnClass(int columnIndex) {
		switch (this.columns[columnIndex]) {
		case HREF_ID:		return Integer.class;
		case TYPE_FLAG:		return ImageIcon.class;
		case METHOD:		return String.class;
		case URL:			return String.class;
		case CODE:			return Integer.class;
		case REASON:		return String.class;
		case RTT:			return Integer.class;
		case SIZE:			return Integer.class;
		case SESSION_ID:	return Long.class;
		case ALERT_FLAG:	return ImageIcon.class;
		case TAGS:			return String.class;
		default:			return null;
		}
	}
836786
public static JClass localForName(String name)
  {
    JClassLoaderWrapper jLoader = JClassLoaderWrapper.create();
    
    return jLoader.forName(name);
  }
228180
private void getEJBWithProviderClasses(Set<String> classeNames, EJBEndpoint ejb, String ejbInterfaceName, ClassLoader appClassloader) {
        final String methodName = "getEJBWithProviderClasses";
        if (tc.isEntryEnabled())
            Tr.entry(tc, methodName, classeNames, ejb, ejbInterfaceName);

        if (classeNames == null) {
            if (tc.isEntryEnabled())
                Tr.exit(tc, methodName, Collections.emptySet());
            return;
        }

        Class<Provider> providerClass = Provider.class;
        final String ejbClassName = (ejbInterfaceName == null) ? ejb.getClassName() : ejbInterfaceName;
        Class<?> c = null;
        try {
            c = appClassloader.loadClass(ejbClassName);
        } catch (ClassNotFoundException e) {

//            if (tc.isDebugEnabled()) {
//                Tr.debug(tc, "getEJBWithProviderClasses() exit - due to Class Not Found for " + ejbClassName + ": " + e);
//            }
            Tr.error(tc, "error.failed.toloadejbclass", ejbClassName);
        }

        if (c != null && c.getAnnotation(providerClass) != null) {
            classeNames.add(ejbClassName);
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, methodName, classeNames);
    }
31281
def get_suitable_vis_classes(obj):
    """"""

    ret = []
    for class_ in classes_vis():
        if isinstance(obj, class_.input_classes):
            ret.append(class_)
    return ret
232412
public static JoinTable getJoinTable(Class<?> clazz) {
		Class<?> curClass = clazz;
		while (curClass != null) {
			JoinTable joinTable = curClass.getAnnotation(JoinTable.class);
			if(joinTable != null) {
				return joinTable;
			}
			curClass = curClass.getSuperclass();
		}
		
		return null;
	}
851969
def _find_class(self, class_name):
        ""
        classes = {}
        classes.update(globals())
        classes.update(self.INSTANCE_CLASSES)
        logger.debug(f'looking up class: {class_name}')
        cls = classes[class_name]
        logger.debug(f'found class: {cls}')
        return cls
81203
public static Class getPrimitiveObjectClass(Class pClass) {
        if (pClass == Boolean.TYPE) {
            return Boolean.class;
        } else if (pClass == Byte.TYPE) {
            return Byte.class;
        } else if (pClass == Short.TYPE) {
            return Short.class;
        } else if (pClass == Character.TYPE) {
            return Character.class;
        } else if (pClass == Integer.TYPE) {
            return Integer.class;
        } else if (pClass == Long.TYPE) {
            return Long.class;
        } else if (pClass == Float.TYPE) {
            return Float.class;
        } else if (pClass == Double.TYPE) {
            return Double.class;
        } else {
            return pClass;
        }
    }
740457
def looks_like_issubclass(obj, classname):
    
    t = obj
    if t.__name__ == classname:
        return True
    for klass in t.__mro__:
        if klass.__name__ == classname:
            return True
    return False
1274986
public static boolean preTiger(JavaClass jclass) {
        return jclass.getMajor() < JDK15_MAJOR || (jclass.getMajor() == JDK15_MAJOR && jclass.getMinor() < JDK15_MINOR);

    }
559659
private void getEJBWithPathClasses(Set<String> classeNames, EJBEndpoint ejb, String ejbInterfaceName, ClassLoader appClassloader) {
        final String methodName = "getEJBWithPathClasses";
        if (tc.isEntryEnabled())
            Tr.entry(tc, methodName, classeNames, ejb, ejbInterfaceName);
        if (classeNames == null) {
            if (tc.isEntryEnabled())
                Tr.exit(tc, methodName, Collections.emptySet());
        }

        Class<Path> pathClass = Path.class;
        final String ejbClassName = (ejbInterfaceName == null) ? ejb.getClassName() : ejbInterfaceName;
        Class<?> c = null;
        try {
            c = appClassloader.loadClass(ejbClassName);
        } catch (ClassNotFoundException e) {

            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "getEJBWithPathClasses() exit - due to Class Not Found for " + ejbClassName + ": " + e);
            }
        }

        if (c != null && c.getAnnotation(pathClass) != null) {
            classeNames.add(ejbClassName);
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, methodName, classeNames);
    }
97795
private JCTree matchAnnoToTree(AnnotationMirror findme,
                                   Element e, JCTree tree) {
        Symbol sym = cast(Symbol.class, e);
        class Vis extends JCTree.Visitor {
            List<JCAnnotation> result = null;
            public void visitTopLevel(JCCompilationUnit tree) {
                result = tree.packageAnnotations;
            }
            public void visitClassDef(JCClassDecl tree) {
                result = tree.mods.annotations;
            }
            public void visitMethodDef(JCMethodDecl tree) {
                result = tree.mods.annotations;
            }
            public void visitVarDef(JCVariableDecl tree) {
                result = tree.mods.annotations;
            }
        }
        Vis vis = new Vis();
        tree.accept(vis);
        if (vis.result == null)
            return null;

        List<Attribute.Compound> annos = sym.getRawAttributes();
        return matchAnnoToTree(cast(Attribute.Compound.class, findme),
                               annos,
                               vis.result);
    }