if Class.forName(x) is recognized, make a direct method call
423338
protected boolean makeClassForNameCall(Expression origin, Expression receiver, Expression message, Expression arguments) {
        if (! (receiver instanceof ClassExpression)) return false;
        ClassExpression ce = (ClassExpression) receiver;
        if (!ClassHelper.CLASS_Type.equals(ce.getType())) return false;
        String msg = getMethodName(message);
        if (!"forName".equals(msg)) return false;
        ArgumentListExpression ae = makeArgumentList(arguments);
        if (ae.getExpressions().size()!=1) return false;
        return writeDirectMethodCall(CLASS_FOR_NAME_STRING,false, receiver, ae);
    }
146946
@Override
  public Class<?> classForName(final String name) throws ClassNotFoundException {
    return ReflectionUtilities.classForName(name, loader);
  }
866140
def class_register(cls):
    """"""
    cls.handler_registry = {}
    for method_name in dir(cls):
        method = getattr(cls, method_name)
        if hasattr(method, '_handle'):
            cls.handler_registry.update({method._handle: method_name})
    return cls
32309
Optional<ExecutableElement> findAccessibleNoArgumentInstanceMethod(TypeElement classElement, String methodName) {
        return ElementFilter.methodsIn(elementUtils.getAllMembers(classElement))
                .stream().filter(m -> m.getSimpleName().toString().equals(methodName) && !isPrivate(m) && !isStatic(m))
                .findFirst();
    }
62575
void checkForGetter(Map<Integer, Instruction> pcMap) throws ClassParseException {
      final String methodName = getMethod().getName();
      String rawVarNameCandidate = null;
      boolean mightBeGetter = true;

      if (methodName.startsWith("get")) {
         rawVarNameCandidate = methodName.substring(3);
      } else if (methodName.startsWith("is")) {
         rawVarNameCandidate = methodName.substring(2);
      } else {
         mightBeGetter = false;
      }

      // Getters should have 3 bcs: aload_0, getfield, ?return
      if (mightBeGetter) {
         boolean possiblySimpleGetImplementation = pcMap.size() == 3;
         if ((rawVarNameCandidate != null) && (isNoCL() || possiblySimpleGetImplementation)) {
            final String firstLetter = rawVarNameCandidate.substring(0, 1).toLowerCase();
            final String varNameCandidateCamelCased = rawVarNameCandidate.replaceFirst(rawVarNameCandidate.substring(0, 1), firstLetter);
            String accessedFieldName;

            if (!isNoCL()) {

               Instruction instruction = expressionList.getHead();

               if ((instruction instanceof Return) && (expressionList.getHead() == expressionList.getTail())) {
                  instruction = instruction.getPrevPC();
                  if (instruction instanceof AccessInstanceField) {
                     final FieldEntry field = ((AccessInstanceField) instruction).getConstantPoolFieldEntry();
                     accessedFieldName = field.getNameAndTypeEntry().getNameUTF8Entry().getUTF8();
                     if (accessedFieldName.equals(varNameCandidateCamelCased)) {

                        // Verify field type matches return type
                        final String fieldType = field.getNameAndTypeEntry().getDescriptorUTF8Entry().getUTF8();
                        final String returnType = getMethod().getDescriptor().substring(2);
                        //System.out.println( "### field type = " + fieldType );
                        //System.out.println( "### method args = " + returnType );
                        assert (fieldType.length() == 1) && (returnType.length() == 1) : " can only use basic type getters";

                        // Allow isFoo style for boolean fields
                        if ((methodName.startsWith("is") && fieldType.equals("Z")) || (methodName.startsWith("get"))) {
                           if (fieldType.equals(returnType)) {
                              if (logger.isLoggable(Level.FINE)) {
                                 logger.fine("Found " + methodName + " as a getter for " + varNameCandidateCamelCased.toLowerCase());
                              }

                              methodIsGetter = true;
                              setAccessorVariableFieldEntry(field);
                              assert methodIsSetter == false : " cannot be both";
                           } else {
                              throw new ClassParseException(ClassParseException.TYPE.BADGETTERTYPEMISMATCH, methodName);

                           }
                        }
                     } else {
                        throw new ClassParseException(ClassParseException.TYPE.BADGETTERNAMEMISMATCH, methodName);
                     }
                  }
               } else {
                  throw new ClassParseException(ClassParseException.TYPE.BADGETTERNAMENOTFOUND, methodName);
               }
            } else {
               FieldEntry fieldEntry = getMethod().getOwnerClassModel().getConstantPool().getFieldEntry(varNameCandidateCamelCased);
               setAccessorVariableFieldEntry(fieldEntry);
               if (getAccessorVariableFieldEntry() == null) {
                  throw new ClassParseException(ClassParseException.TYPE.BADGETTERNAMEMISMATCH, methodName);
               }
               methodIsGetter = true;
               if (method.getClassModel().getPrivateMemorySize(fieldEntry.getNameAndTypeEntry().getNameUTF8Entry().getUTF8()) != null)
               {
                  methodIsPrivateMemoryGetter = true;
               }
            }
         } else {
            throw new ClassParseException(ClassParseException.TYPE.BADGETTERNAMENOTFOUND, methodName);
         }
      }
   }
550957
public static Class<?> classForName(String name) throws ClassNotFoundException {
        if ("void".equals(name)) return void.class;
        if ("char".equals(name)) return char.class;
        if ("boolean".equals(name)) return boolean.class;
        if ("byte".equals(name)) return byte.class;
        if ("short".equals(name)) return short.class;
        if ("int".equals(name)) return int.class;
        if ("long".equals(name)) return long.class;
        if ("float".equals(name)) return float.class;
        if ("double".equals(name)) return double.class;
        return Class.forName(name, true, Thread.currentThread().getContextClassLoader());
    }
790705
public static Class forName(String className, ClassLoader loader) {
        try {
            return loader.loadClass(className);
        } catch (ClassNotFoundException e) {
            if (aliasClassMap.containsKey(className)) {
                return aliasClassMap.get(className);
            }

            throw new BeanMappingException("forName class[" + className + "] is error!", e);
        }
    }
901433
public static Class forName(String className, ClassLoader cl) {
        try {
            return Class.forName(className, true, cl);
        } catch (Exception e) {
            throw new SofaRpcRuntimeException(e);
        }
    }
602085
protected Class<?> classForName(String name) throws ClassNotFoundException {
      try {
        ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
        if (contextClassLoader != null) {
          return Class.forName(name, false, contextClassLoader);
        }
      } catch (Throwable e) {
        // ignore
      }
      return Class.forName(name, false, getClass().getClassLoader());
    }
1361406
def call(self, name, *a):
        """"""
        return callJavaFunc(self._sc, getattr(self._java_model, name), *a)
1005597
function detect_class_members_from_object(cls, ast) {
  cls["members"] = []
  return each_pair_in_object_expression(ast, function(key, value, pair) {
    detect_method_or_property(cls, key, value, pair);
  });
}
83730
void checkForSetter(Map<Integer, Instruction> pcMap) throws ClassParseException {
      final String methodName = getMethod().getName();
      if (methodName.startsWith("set")) {
         final String rawVarNameCandidate = methodName.substring(3);
         final String firstLetter = rawVarNameCandidate.substring(0, 1).toLowerCase();
         final String varNameCandidateCamelCased = rawVarNameCandidate.replaceFirst(rawVarNameCandidate.substring(0, 1),
               firstLetter);
         String accessedFieldName = null;
         final Instruction instruction = expressionList.getHead();

         // setters should be aload_0, ?load_1, putfield, return
         if ((instruction instanceof AssignToInstanceField) && (expressionList.getTail() instanceof Return) && (pcMap.size() == 4)) {
            final Instruction prev = instruction.getPrevPC();
            if (prev instanceof AccessLocalVariable) {
               final FieldEntry field = ((AssignToInstanceField) instruction).getConstantPoolFieldEntry();
               accessedFieldName = field.getNameAndTypeEntry().getNameUTF8Entry().getUTF8();
               if (accessedFieldName.equals(varNameCandidateCamelCased)) {

                  // Verify field type matches setter arg type
                  final String fieldType = field.getNameAndTypeEntry().getDescriptorUTF8Entry().getUTF8();
                  final String setterArgType = getMethod().getDescriptor().substring(1, 2);

                  //System.out.println( "### field type = " + fieldType );
                  //System.out.println( "### setter type = " + setterArgType );
                  assert fieldType.length() == 1 : " can only use basic type getters";

                  if (fieldType.equals(setterArgType)) {
                     if (logger.isLoggable(Level.FINE)) {
                        logger.fine("Found " + methodName + " as a setter for " + varNameCandidateCamelCased.toLowerCase()
                              + " of type " + fieldType);
                     }

                     methodIsSetter = true;
                     setAccessorVariableFieldEntry(field);

                     // Setters use putfield which will miss the normal store check
                     if (fieldType.equals("B") || fieldType.equals("Z")) {
                        usesByteWrites = true;
                     }

                     assert methodIsGetter == false : " cannot be both";
                  } else {
                     throw new ClassParseException(ClassParseException.TYPE.BADSETTERTYPEMISMATCH, methodName);
                  }
               } else {
                  throw new ClassParseException(ClassParseException.TYPE.BADSETTERTYPEMISMATCH, methodName);
               }
            }
         }
      }
   }
831658
def name(cls, func):
        """""" 
        cls.count = cls.count + 1
        fpath = '{}_{}{}'.format(cls.count, func.__name__, cls.suffix)
        if cls.directory:
            fpath = os.path.join(cls.directory, fpath)
        return fpath
58843
def _call(self, x, out=None):
        """"""
        if out is None:
            out = x[self.index].copy()
        else:
            out.assign(x[self.index])
        return out
699335
private static boolean isRiskyName(String className, String methodName) {
		if (riskyClassNames.contains(className)) {
			return true;
		}

		String qualifiedMethodName = className + '.' + methodName;
		if (riskyMethodNameContents.contains(qualifiedMethodName)) {
			return true;
		}

		for (String riskyName : riskyMethodNameContents) {
			if (methodName.indexOf(riskyName) >= 0) {
				return true;
			}
		}

		return methodName.indexOf(Values.SYNTHETIC_MEMBER_CHAR) >= 0;
	}
1297595
public static Class forName(String name) throws ClassNotFoundException {
		// try with caller classloader
		ClassLoader loader = getClassLoaderContextAt(3);
		try {
			return Class.forName(name, true, loader);
		} catch (ClassNotFoundException e) {
			// try with context classloader if set & different
			ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
			if (contextLoader == null || contextLoader == loader) {
				throw e;
			} else {
				return Class.forName(name, true, contextLoader);
			}
		}
	}
458069
@Override
    void findReferencedClassNames(final Set<String> classNameListOut) {
        for (final TypeParameter typeParameter : typeParameters) {
            if (typeParameter != null) {
                typeParameter.findReferencedClassNames(classNameListOut);
            }
        }
        for (final TypeSignature typeSignature : parameterTypeSignatures) {
            if (typeSignature != null) {
                typeSignature.findReferencedClassNames(classNameListOut);
            }
        }
        resultType.findReferencedClassNames(classNameListOut);
        for (final ClassRefOrTypeVariableSignature typeSignature : throwsSignatures) {
            if (typeSignature != null) {
                typeSignature.findReferencedClassNames(classNameListOut);
            }
        }
    }