是否为基本类型（包括包装类和原始类）

@param clazz 类
@return 是否为基本类型
425388
public static boolean isBasicType(Class<?> clazz) {
		if (null == clazz) {
			return false;
		}
		return (clazz.isPrimitive() || isPrimitiveWrapper(clazz));
	}
1178859
public static String getCommandName(Class<?> clazz) {
    String name = clazz.getName();
    return Strings.uncapitalize(name.substring(name.lastIndexOf('.') + 1));
  }
21601
public String deleteAll(final Class<?> clazz) {
    return new SQL() {
      {
        DELETE_FROM(EntityUtil.getTableName(clazz));
      }
    }.toString();
  }
1112086
public static CustomPropertyDescriptor[] getPropertyDescriptors(Class<?> clazz) throws NullPointerException {
        if (clazz == null) {
            throw new NullPointerException("clazz为null");
        }
        // 首先从缓存中检查
        CustomPropertyDescriptor[] descriptors = CACHE.get(clazz);
        if (descriptors != null) {
            log.debug("获取Class {} 的说明时发现缓存中有，取出缓存中的说明返回", clazz);
            return descriptors;
        }

        Field[] fields = getAllFields(clazz);

        descriptors = new CustomPropertyDescriptor[fields.length];
        if (fields.length == 0) {
            log.debug("源{}中不存在已经声明的字段", clazz.getName());
            CACHE.put(clazz, descriptors);
            return descriptors;
        }

        int j = 0;
        for (Field field : fields) {
            CustomPropertyDescriptor descriptor = buildDescriptor(field, clazz);
            if (descriptor != null) {
                descriptors[j++] = descriptor;
            }
        }

        if (j < descriptors.length) {
            log.debug("构建构成中发生了异常，数组中有null，除去null");
            CustomPropertyDescriptor[] propertyDescriptor = new CustomPropertyDescriptor[j];
            System.arraycopy(descriptors, 0, propertyDescriptor, 0, j);
            CACHE.put(clazz, propertyDescriptor);
            return propertyDescriptor;
        } else {
            log.debug("构建没有异常，构建成功");
            CACHE.put(clazz, descriptors);
            return descriptors;
        }
    }
583325
static List<Field> getAllFieldsOfClass0(Class<?> clazz) {
        List<Field> fields = CollectionUtil.createArrayList();
        for (Class<?> itr = clazz; hasSuperClass(itr); ) {
            fields.addAll(Arrays.asList(itr.getDeclaredFields()));
            itr = itr.getSuperclass();
        }

        return fields;
    }
466776
public static String getJavadoc(@Nullable final Class<?> clazz) {
    try {
      if (null == clazz) return null;
      @Nullable final File source = com.simiacryptus.util.lang.CodeUtil.findFile(clazz);
      if (null == source) return clazz.getName() + " not found";
      final List<String> lines = IOUtils.readLines(new FileInputStream(source), Charset.forName("UTF-8"));
      final int classDeclarationLine = IntStream.range(0, lines.size())
        .filter(i -> lines.get(i).contains("class " + clazz.getSimpleName())).findFirst().getAsInt();
      final int firstLine = IntStream.rangeClosed(1, classDeclarationLine).map(i -> classDeclarationLine - i)
        .filter(i -> !lines.get(i).matches("\\s*[/\\*@].*")).findFirst().orElse(-1) + 1;
      final String javadoc = lines.subList(firstLine, classDeclarationLine).stream()
        .filter(s -> s.matches("\\s*[/\\*].*"))
        .map(s -> s.replaceFirst("^[ \t]*[/\\*]+", "").trim())
        .filter(x -> !x.isEmpty()).reduce((a, b) -> a + "\n" + b).orElse("");
      return javadoc.replaceAll("<p>", "\n");
    } catch (@javax.annotation.Nonnull final Throwable e) {
      e.printStackTrace();
      return "";
    }
  }
666626
@Override
    public String readObjectB(final Class clazz) {
        this.fieldIndex = 0; //必须要重置为0
        if (this.text.length == 0) return null;
        char ch = this.text[++this.position];
        if (ch == '{') return "";
        if (ch <= ' ') {
            for (;;) {
                ch = this.text[++this.position];
                if (ch > ' ') break;
            }
            if (ch == '{') return "";
        }
        if (ch == 'n' && text[++position] == 'u' && text[++position] == 'l' && text[++position] == 'l') return null;
        if (ch == 'N' && text[++position] == 'U' && text[++position] == 'L' && text[++position] == 'L') return null;
        throw new ConvertException("a json object text must begin with '{' (position = " + position + ") but '" + ch + "' in (" + new String(this.text) + ")");
    }
582128
public Config getConfig(Class<?> clazz) {
        Config config = DEFAULT_CONFIG;

        Config globalConfig = Config.Implementation.fromProperties(getConfigProperties());
        if (globalConfig != null) {
            config = new Config.Implementation(config, globalConfig);
        }

        Config classConfig = clazz.getAnnotation(Config.class);
        if (classConfig != null) {
            config = new Config.Implementation(config, classConfig);
        }

        return config;
    }
1270739
public static File getClassJar(Class clazz) {
		File file = null;

		try {
			file = new File(clazz.getProtectionDomain().getCodeSource().getLocation().toURI());
		} catch (URISyntaxException e) {}

		return file;
	}
668261
public static ClassLoader getClassLoader(Class<?> clazz) {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        if (loader != null) {
            return loader;
        }
        if (clazz != null) {
            loader = clazz.getClassLoader();
            if (loader != null) {
                return loader;
            }
        }
        return ClassLoader.getSystemClassLoader();
    }
837063
public static Map<String, Field> findFields(final Class<?> clazz) {
        Map<String, Field> foundFields = new HashMap<>();
        Class<?> searchType = clazz;
        while (!Object.class.equals(searchType) && (searchType != null)) {
            Field[] fields = searchType.getDeclaredFields();
            for (Field field : fields) {
                field.setAccessible(true);
                if(foundFields.get(field.getName()) == null) {
                    foundFields.put(field.getName(), field);
                }
            }
            searchType = searchType.getSuperclass();
        }
        return foundFields;
    }
389519
public static String getClassName( final Class<?> clazz ) {
        final String fullName = clazz.getName();
        final int fullNameLength = fullName.length();

        // Check for array ('[') or the class/interface marker ('L') ...
        int numArrayDimensions = 0;
        while (numArrayDimensions < fullNameLength) {
            final char c = fullName.charAt(numArrayDimensions);
            if (c != '[') {
                String name = null;
                // Not an array, so it must be one of the other markers ...
                switch (c) {
                    case 'L': {
                        name = fullName.subSequence(numArrayDimensions + 1, fullNameLength).toString();
                        break;
                    }
                    case 'B': {
                        name = "byte";
                        break;
                    }
                    case 'C': {
                        name = "char";
                        break;
                    }
                    case 'D': {
                        name = "double";
                        break;
                    }
                    case 'F': {
                        name = "float";
                        break;
                    }
                    case 'I': {
                        name = "int";
                        break;
                    }
                    case 'J': {
                        name = "long";
                        break;
                    }
                    case 'S': {
                        name = "short";
                        break;
                    }
                    case 'Z': {
                        name = "boolean";
                        break;
                    }
                    case 'V': {
                        name = "void";
                        break;
                    }
                    default: {
                        name = fullName.subSequence(numArrayDimensions, fullNameLength).toString();
                    }
                }
                if (numArrayDimensions == 0) {
                    // No array markers, so just return the name ...
                    return name;
                }
                // Otherwise, add the array markers and the name ...
                if (numArrayDimensions < BRACKETS_PAIR.length) {
                    name = name + BRACKETS_PAIR[numArrayDimensions];
                } else {
                    for (int i = 0; i < numArrayDimensions; i++) {
                        name = name + BRACKETS_PAIR[1];
                    }
                }
                return name;
            }
            ++numArrayDimensions;
        }

        return fullName;
    }
829203
private String fillClazz(String configClazz, String clazz) {
		if (!clazz.equals(configClazz)) {
			return configClazz;
		} else {
			return null;
		}
	}
1135453
public static ManifestVersion get(final Class<?> clazz)
	{
		final String manifestUrl = ClassExtensions.getManifestUrl(clazz);
		try
		{
			return of(manifestUrl != null ? new URL(manifestUrl) : null);
		}
		catch (final MalformedURLException ignore)
		{
			return of(null);
		}
	}
1181537
public static <T> T getInstance(Class<T> clazz) {
        try {
            Constructor<T> constructor = clazz.getConstructor();
            ReflectUtil.allowAccess(constructor);
            return constructor.newInstance();
        } catch (Exception e) {
            throw new ReflectException("获取类实例异常，可能是没有默认无参构造器", e);
        }
    }
211729
public static Map<String, Method> getClassReadMethods(Class<?> clazz) {
		Map<String, Method> readMethods = classReadMethods.get(clazz);
		if (readMethods == null) {
			cacheReadWriteMethodsAndBoxField(clazz);
			return classReadMethods.get(clazz);
		} else
			return readMethods;
	}
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;
    }