Get all declared constructors in the class and set accessible to
{@code true}.

@param clazz The class whose constructors to get.
@return All constructors declared in this class hierarchy.
979241
public static Constructor<?>[] getAllConstructors(Class<?> clazz) {
        Constructor<?>[] declaredConstructors = clazz.getDeclaredConstructors();
        for (Constructor<?> constructor : declaredConstructors) {
            if (!constructor.isAccessible()) {
                constructor.setAccessible(true);
            }
        }
        return declaredConstructors;
    }
1317408
public Set<Constructor> getConstructorsWithAnyParamAnnotated(Class<? extends Annotation> annotation) {
        return getConstructorsFromDescriptors(store.get(index(MethodParameterScanner.class), annotation.getName()), loaders());
    }
300211
public static Method[] getAllMethods(Class<?> clz) {
    Set<Method> set = new HashSet<>();
    List<Class<?>> classes = new ArrayList<>();
    classes.add(clz);
    classes.addAll(Arrays.asList(getAllSuperClasses(clz)));
    classes.addAll(Arrays.asList(getAllInterfaces(clz)));
    for (Class<?> c : classes) {
      set.addAll(Arrays.asList(c.getDeclaredMethods()));
    }
    return set.toArray(new Method[set.size()]);
  }
463377
private static List<Field> getAllFields(Class<?> clazz){
		if(!clazz.equals(Object.class)){
			List<Field> fields = new ArrayList<Field>(Arrays.asList(clazz.getDeclaredFields()));
			List<Field> fields2 = getAllFields(clazz.getSuperclass());
			if(fields2!=null){
				fields.addAll(fields2);
			}
			return fields;
		}else{
			return null;
		}
	}
500434
public static List<Method> getAllDeclaredMethods(Class<?> clazz) {
		List<Method> result = new ArrayList<>();
		while (clazz != null) {
			Method[] methods = clazz.getDeclaredMethods();
			Collections.addAll(result, methods);
			clazz = clazz.getSuperclass();
		}
		return result;
	}
167826
public static String getDescriptor(final Class<?> clazz) {
    StringBuilder stringBuilder = new StringBuilder();
    appendDescriptor(stringBuilder, clazz);
    return stringBuilder.toString();
  }
1297573
public static Builder forClass(Class clazz) {
        if (clazz == null) {
            throw new IllegalArgumentException("class can not be null");
        }
        return new Builder(Collections.singletonList(clazz));
    }
504656
public static List<Method> getAllMethods(Class clazz) {
        List<Method> all = new ArrayList<Method>();
        for (Class<?> c = clazz; c != Object.class && c != null; c = c.getSuperclass()) {
            Method[] methods = c.getDeclaredMethods(); // 所有方法，不包含父类
            for (Method method : methods) {
                int mod = method.getModifiers();
                // native的不要
                if (Modifier.isNative(mod)) {
                    continue;
                }
                method.setAccessible(true); // 不管private还是protect都可以
                all.add(method);
            }
        }
        return all;
    }
83333
private static Map<String, PropertyAccessor> _getAccessors(
                    final Class<?> clazz
                    )
    {
        Map<String, PropertyAccessor>  accessors = null;

        synchronized (_ACCESSORS_REG_) {
            accessors = _ACCESSORS_REG_.get( clazz );
            if (accessors == null) {
                accessors = PropertyAccessor.findAll( clazz );
                _ACCESSORS_REG_.put( clazz, accessors );
            }
        }

        return accessors;
    }
964873
public static boolean hasAccessibleDefaultConstructor(Class<?> clazz) {
    Constructor<?> constructor;
    try {
      constructor = clazz.getDeclaredConstructor();
    } catch (NoSuchMethodException e) {
      return clazz.getDeclaredConstructors().length == 0;
    }

    return !isPrivate(constructor);
  }
668889
public static List<Class<?>> getAllClasses(Class<?> clazz) {
        List<Class<?>> types = new ArrayList<>();
        while (clazz != null) {
            types.add(clazz);
            clazz = clazz.getSuperclass();
        }
        return types;
    }
813535
public static List<String> getNames(Class<? extends Enum<?>> clazz) {
		final Enum<?>[] enums = clazz.getEnumConstants();
		if (null == enums) {
			return null;
		}
		final List<String> list = new ArrayList<>(enums.length);
		for (Enum<?> e : enums) {
			list.add(e.name());
		}
		return list;
	}
2542
public static boolean hasConstructorInTheCorrectForm(Class<?> clazz) {
		
		if (clazz.getConstructors().length != 1) {
			return false;
		}

		Constructor<?> con = clazz.getConstructors()[0];

		if (con.getParameterTypes().length == 0) {
			return false;
		}

		Annotation[][] parameterAnnotations = con.getParameterAnnotations();
		for (Annotation[] as : parameterAnnotations) {
			if (!hasColumnAnnotation(as)) {
				return false;
			}
		}

		return true;
	}
16583
public static List<Field> getAllFields(Class<?> clazz) {
        final List<Field> ret = new ArrayList<>();
        do {
            ret.addAll(Arrays.asList(clazz.getDeclaredFields()));
            clazz = clazz.getSuperclass();
        } while (clazz != null);
        return ret;
    }
758008
public static ConstructorParameterPair getConstructorParameterPairIgnoreCase(Class clazz, Object[] parameters) throws NoSuchMethodException {
	// set all values
	// Class objectClass=object.getClass();
	if (parameters == null) parameters = new Object[0];

	// set parameter classes
	Class[] parameterClasses = new Class[parameters.length];
	for (int i = 0; i < parameters.length; i++) {
	    parameterClasses[i] = parameters[i].getClass();
	}

	// search right method
	Constructor[] constructor = clazz.getConstructors();
	for (int mode = 0; mode < 2; mode++) {
	    outer: for (int i = 0; i < constructor.length; i++) {
		Constructor c = constructor[i];

		Class[] paramTrg = c.getParameterTypes();
		// Same Parameter count
		if (parameterClasses.length == paramTrg.length) {
		    for (int y = 0; y < parameterClasses.length; y++) {
			if (mode == 0 && parameterClasses[y] != primitiveToWrapperType(paramTrg[y])) {
			    continue outer;
			}
			else if (mode == 1) {
			    Object o = compareClasses(parameters[y], paramTrg[y]);
			    if (o == null) continue outer;

			    parameters[y] = o;
			    parameterClasses[y] = o.getClass();

			}
		    }
		    return new ConstructorParameterPair(c, parameters);
		}

	    }
	}

	// Exeception
	String parameter = "";
	for (int i = 0; i < parameterClasses.length; i++) {
	    if (i != 0) parameter += ", ";
	    parameter += parameterClasses[i].getName();
	}
	throw new NoSuchMethodException("class constructor " + clazz.getName() + "(" + parameter + ") doesn't exist");
    }
44552
protected List<Field> getFields(Class<?> clazz) {
        List<Field> fields = new ArrayList<Field>();

        while (clazz != null && !isBoundaryClass(clazz)) {
            for (Field field : clazz.getDeclaredFields()) {
                if (!field.isAnnotationPresent(Inject.class)) {
                    continue;
                }
                fields.add(field);
            }
            clazz = clazz.getSuperclass();
        }
        return fields;
    }
1017896
public static <T> Clazz<T> Clazz( Class<T> clazz )
	{
		return impl.Clazz( clazz );
	}