use clazz instead of class as it is a reserved keyword
194539
function() {
        if (!(this instanceof clazz)) {
          throw new Error("Use new keyword to create a new instance or call/apply class with right scope");
        }
        Class.onBeforeInstantiation && Class.onBeforeInstantiation(this);
        
        // remember the current super property
        var temp = this.__super__;
        // set the right super class prototype
        this.__super__ = superClass;

        // call the right constructor
        if (constructor) {
          constructor.apply(this, arguments);
        } else if (superClass) {
          superClass.apply(this, arguments);
        }
        // reset the current super property
        this.__super__ = temp;
        Class.onAfterInstantiation && Class.onAfterInstantiation(this);
      }
598870
private Group[] parseMethods(Class clazz) {
        List<Group> groups = new ArrayList();
        Group unknownGroup = new Group();
        groups.add(unknownGroup);
        String[] groupsOrder = new String[0];

        for (Method method : clazz.getMethods()) {
            Property prop = new Property();

            prop.deprecated = method.isAnnotationPresent(Deprecated.class);

            if (method.isAnnotationPresent(Key.class)) {
                Key val = method.getAnnotation(Key.class);
                prop.name = val.value();
            } else {
                prop.name = method.getName();
            }

            if (method.isAnnotationPresent(DefaultValue.class)) {
                DefaultValue val = method.getAnnotation(DefaultValue.class);
                prop.defaultValue = val.value();
            }

            unknownGroup.properties.add(prop);
        }

        return orderGroup(groups, groupsOrder);
    }
243503
private void loadProtoClassToCache(String key, Class clazz, String methodName) {
        Method pbMethod = null;
        Method[] methods = clazz.getMethods();
        for (Method method : methods) {
            if (methodName.equals(method.getName())) {
                pbMethod = method;
                break;
            }
        }
        if (pbMethod == null) {
            throw new SofaRpcRuntimeException("Cannot found protobuf method: " + clazz.getName() + "." + methodName);
        }
        Class[] parameterTypes = pbMethod.getParameterTypes();
        if (parameterTypes == null
            || parameterTypes.length != 1
            || isProtoBufMessageObject(parameterTypes[0])) {
            throw new SofaRpcRuntimeException("class based protobuf: " + clazz.getName()
                + ", only support one protobuf parameter!");
        }
        Class reqClass = parameterTypes[0];
        requestClassCache.put(key, reqClass);
        Class resClass = pbMethod.getReturnType();
        if (resClass == void.class || !isProtoBufMessageClass(resClass)) {
            throw new SofaRpcRuntimeException("class based protobuf: " + clazz.getName()
                + ", only support return protobuf message!");
        }
        responseClassCache.put(key, resClass);
    }
610427
private static Class<?> box(Class<?> clazz) {
        if (clazz == int.class) {
            return Integer.class;
        } else
            if (clazz == float.class) {
                return Float.class;
            } else
                if (clazz == long.class) {
                    return Long.class;
                } else
                    if (clazz == double.class) {
                        return double.class;
                    } else
                        if (clazz == boolean.class) {
                            return Boolean.class;
                        } else
                            if (clazz == char.class) {
                                return Character.class;
                            } else
                                if (clazz == byte.class) {
                                    return Byte.class;
                                }
        return clazz;
    }
419548
public static void initializeClass(Class clazz) {
		try {
			Class.forName(clazz.getName(), true, Thread.currentThread().getContextClassLoader());
		}
		catch (ClassNotFoundException e) {
			throw new RuntimeException(e);
		}
	}
624496
private static String getPackageName(Class<?> clazz) {

        LettuceAssert.notNull(clazz, "Class must not be null");
        return getPackageName(clazz.getName());
    }
534487
def klass
      klass_name = options.fetch(:class, name).to_s.camelize
      Object.const_get(klass_name)
    rescue NameError
      raise InvalidClassError, "class #{klass_name.inspect} does not exist"
    end
268828
public <T> Clazz<T> FindClazz( Class<T> clazz )
	{
		if( clazzz == null )
			return null;

		for( Clazz<?> c : clazzz.values() )
			if( c.getReflectedClass() == clazz )
			{
				@SuppressWarnings( "unchecked" )
				Clazz<T> result = (Clazz<T>) c;
				return result;
			}

		return null;
	}
1149512
@SuppressWarnings("unchecked")
	private Set<Class<? extends C>> findScriptClass(Set<Class<?>> clazzs)
			throws InstantiationException, IllegalAccessException {
		Set<Class<? extends C>> scriptClazzs = new HashSet<Class<? extends C>>();
		for (Class<?> clazz : clazzs) {
			if (parentClass.isAssignableFrom(clazz)) {
				Class<C> scriptClazz = (Class<C>) clazz;
				scriptClazzs.add(scriptClazz);
			}
		}
		return scriptClazzs;
	}
543868
private static String which(Class clazz) {
        try {
            String classnameAsResource = clazz.getName().replace('.', '/') + ".class";

            ClassLoader loader = clazz.getClassLoader();

            URL it;

            if (loader != null) {
                it = loader.getResource(classnameAsResource);
            } else {
                it = ClassLoader.getSystemResource(classnameAsResource);
            }

            if (it != null) {
                return it.toString();
            }
        }
        // The VM ran out of memory or there was some other serious problem. Re-throw.
        catch (VirtualMachineError vme) {
            throw vme;
        }
        // ThreadDeath should always be re-thrown
        catch (ThreadDeath td) {
            throw td;
        }
        catch (Throwable t) {
            // work defensively.
            if (debug) {
                t.printStackTrace();
            }
        }
        return "unknown location";
    }
367325
private static int skipClassDueToSunJVMBug(Class clazz) {
        for (int i = 0; i < sunProblematicClasses.length; ++i) {
            Class sunPbClass = sunProblematicClasses[i];
            if (clazz == sunPbClass) {
                return ((Integer) sunProblematicClassesSizes.get(clazz.getName())).intValue();
            }
        }
        return 0;
    }
784504
@SuppressWarnings("unchecked")
  public <T> T get(String key, Class<T> clazz) {
    return (T) datas.get(key);
  }
579847
public static String simpleClassName(Class<?> clazz) {
        String className = checkNotNull(clazz, "clazz").getName();
        final int lastDotIdx = className.lastIndexOf(PACKAGE_SEPARATOR_CHAR);
        if (lastDotIdx > -1) {
            return className.substring(lastDotIdx + 1);
        }
        return className;
    }
829203
private String fillClazz(String configClazz, String clazz) {
		if (!clazz.equals(configClazz)) {
			return configClazz;
		} else {
			return null;
		}
	}
91004
def get_options(cls, items, options, warnfn):
        ""
        options = cls.update_options(options, items)
        for keyword in cls.defaults:
            if keyword in items:
                value = items[keyword]
                allowed = cls.allowed[keyword]
                if isinstance(allowed, set):  pass
                elif isinstance(allowed, dict):
                    if not isinstance(value, dict):
                        raise ValueError("Value %r not a dict type" % value)
                    disallowed = set(value.keys()) - set(allowed.keys())
                    if disallowed:
                        raise ValueError("Keywords %r for %r option not one of %s"
                                         % (disallowed, keyword, allowed))
                    wrong_type = {k: v for k, v in value.items()
                                  if not isinstance(v, allowed[k])}
                    if wrong_type:
                        errors = []
                        for k,v in wrong_type.items():
                            errors.append("Value %r for %r option's %r attribute not of type %r" %
                                          (v, keyword, k, allowed[k]))
                        raise ValueError('\n'.join(errors))
                elif isinstance(allowed, list) and value not in allowed:
                    if keyword in cls.custom_exceptions:
                        cls.custom_exceptions[keyword](value, keyword, allowed)
                    else:
                        raise ValueError("Value %r for key %r not one of %s"
                                         % (value, keyword, allowed))
                elif isinstance(allowed, tuple):
                    if not (allowed[0] <= value <= allowed[1]):
                        info = (keyword,value)+allowed
                        raise ValueError("Value %r for key %r not between %s and %s" % info)
                options[keyword] = value
        return cls._validate(options, items, warnfn)
1088187
public final static void classAvailable(Class<?> clazz) {
        Object target = classAvailableTarget;
        Method method = classAvailableMethod;
        if (target == null || method == null) {
            return;
        }
        try {
            method.invoke(target, clazz);
        } catch (Throwable t) {
            t.printStackTrace();
        }
    }
1081977
@SuppressWarnings("unchecked")
	public static <T> T get(Class<T> clazz, Object... params) {
		T obj = (T) pool.get(clazz);

		if (null == obj) {
			synchronized (Singleton.class) {
				obj = (T) pool.get(clazz);
				if (null == obj) {
					obj = ReflectUtil.newInstance(clazz, params);
					pool.put(clazz, obj);
				}
			}
		}

		return obj;
	}