判断类是否为基本数据类型

@param cls 需要判定的类

@return 是否基本数据类型
547724
@SuppressWarnings("rawtypes")
	public static boolean isBesicType(Class cls){
		if (cls == null) return false;
		String type = cls.getName();
		return isBasicType(type);
		
	}
710048
public static final <T extends Recyclable> T get(Class<T> cls)
    {
        return get(cls, null);
    }
95676
protected final String getPackage(Class cls) {
        return cls.getPackage() != null ? cls.getPackage().getName() : "defaultPackage";
    }
1202318
public static Number getDefaultValue(Class<? extends Number> cls)
        {
        if (cls == null)
            {
            throw new IllegalArgumentException("Class argument cannot be null.");
            }

        return cls.equals(Integer.class)    ? INT_ZERO
             : cls.equals(Long.class)       ? LONG_ZERO
             : cls.equals(Double.class)     ? DOUBLE_ZERO
             : cls.equals(Float.class)      ? FLOAT_ZERO
             : cls.equals(BigInteger.class) ? BIGINTEGER_ZERO
             : cls.equals(BigDecimal.class) ? BIGDECIMAL_ZERO
             : cls.equals(Short.class)      ? SHORT_ZERO
             : cls.equals(Byte.class)       ? BYTE_ZERO
             : null;
        }
1220152
public static <T> T newInstance(final Class<T> cls) {
        if (Modifier.isAbstract(cls.getModifiers())) {
            if (cls.equals(Map.class)) {
                return (T) new HashMap<>();
            } else if (cls.equals(List.class)) {
                return (T) new ArrayList<>();
            } else if (cls.equals(Set.class)) {
                return (T) new HashSet<>();
            } else if (cls.equals(Queue.class)) {
                return (T) new LinkedList<>();
            } else if (cls.equals(Deque.class)) {
                return (T) new LinkedList<>();
            } else if (cls.equals(SortedSet.class) || cls.equals(NavigableSet.class)) {
                return (T) new TreeSet<>();
            } else if (cls.equals(SortedMap.class) || cls.equals(NavigableMap.class)) {
                return (T) new TreeMap<>();
            }
        }

        try {
            if (Modifier.isStatic(cls.getModifiers()) == false && (cls.isAnonymousClass() || cls.isMemberClass())) {
                // http://stackoverflow.com/questions/2097982/is-it-possible-to-create-an-instance-of-nested-class-using-java-reflection

                final List<Class<?>> toInstantiate = new ArrayList<>();
                Class<?> parent = cls.getEnclosingClass();

                do {
                    toInstantiate.add(parent);
                    parent = parent.getEnclosingClass();
                } while (parent != null && Modifier.isStatic(parent.getModifiers()) == false && (parent.isAnonymousClass() || parent.isMemberClass()));

                if (parent != null) {
                    toInstantiate.add(parent);
                }

                N.reverse(toInstantiate);

                Object instance = null;
                for (Class<?> current : toInstantiate) {
                    instance = instance == null ? invoke(ClassUtil.getDeclaredConstructor(current))
                            : invoke(ClassUtil.getDeclaredConstructor(current, instance.getClass()), instance);
                }

                return invoke(ClassUtil.getDeclaredConstructor(cls, instance.getClass()), instance);
            } else {
                return invoke(ClassUtil.getDeclaredConstructor(cls));
            }
        } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
            throw N.toRuntimeException(e);
        }
    }
1135889
public String alias(Object cls) {
        assertArgumentNotNull("cls", cls);
        assertCanBeClassification(cls);
        return findClassificationAlias((Classification) cls);
    }
207914
public static String getPackageName(final Class<?> cls) {
        if (cls == null) {
            return StringUtils.EMPTY;
        }
        return getPackageName(cls.getName());
    }
788927
public static Type[] getGenerics(Class cls) {
		$.checkNotNull(cls);

		Type genType = cls.getGenericSuperclass();
		if (genType instanceof ParameterizedType) {
			return ((ParameterizedType) genType).getActualTypeArguments();
		}

		return null;
	}
1303391
public static List<Field> getAllFields(Class<?> cls) {
        final List<Field> allFields = new ArrayList<Field>();
        Class<?> currentClass = cls;
        while (currentClass != null) {
            final Field[] declaredFields = currentClass.getDeclaredFields();
            Collections.addAll(allFields, declaredFields);
            currentClass = currentClass.getSuperclass();
        }
        return allFields;
    }
1339893
public static Object loadGenInstance(Class<?> cls) throws ParserException
    {
        try
        {
            Class<?> parserClass;
            try
            {
                parserClass = loadGenClass(cls);
            }
            catch (ClassNotFoundException ex)
            {
                return null;
            }
            return parserClass.newInstance();
        }
        catch (InstantiationException | IllegalAccessException ex)
        {
            throw new ParserException(ex);
        }
    }
1241903
public static <T> ClassSup<T> cls(Class<T> cls) {
                return mapper.get(cls.getName(), () -> new ClassSup<>(cls));
        }
251171
public static Set<Method> getAllMethods(Class<?> classs) {
    Set<Method> set = new HashSet<>();
    Class<?> c = classs;
    while (c != null) {
      set.addAll(Arrays.asList(c.getDeclaredMethods()));
      c = c.getSuperclass();
    }
    return set;
  }
695327
public static String getPackage(Class<?> cls) {
        // cls.getPackage() sometimes returns null, in which case fall back to string massaging.
        java.lang.Package pkg = cls.isArray() ? cls.getComponentType().getPackage() : cls.getPackage();
        if ( pkg == null ) {
            int dotPos;
            int dolPos = cls.getName().indexOf( '$' );
            if ( dolPos > 0 ) {
                // we have nested classes, so adjust dotpos to before first $
                dotPos = cls.getName().substring( 0, dolPos ).lastIndexOf( '.' );
            } else {
                dotPos = cls.getName().lastIndexOf( '.' );
            }
                
            if ( dotPos > 0 ) {
                return cls.getName().substring( 0,
                                                dotPos );
            } else {
                // must be default package.
                return "";
            }
        } else {
            return pkg.getName();
        }
    }
1182073
public static List<Method> retrieveMethodList(final Class<?> cls, final String methodName) {
        final List<Method> methodList = new ArrayList<>();
        final String camelCasedMethodName = underscoreToCamelCase(methodName);
        for (final Method m : cls.getMethods()) {
            if (m.getName().equals(camelCasedMethodName) || m.getName().equals(methodName)) {
                methodList.add(m);
            }
        }
        return methodList;
    }
1035889
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setCls(final String cls) {
        pathBuilder.setCls(cls);
        return (T) this;
    }
607779
ClassFields get(final Class<?> cls) {
        ClassFields classFields = classToClassFields.get(cls);
        if (classFields == null) {
            classToClassFields.put(cls,
                    classFields = new ClassFields(cls, resolveTypes, onlySerializePublicFields, this));
        }
        return classFields;
    }
9928
@SuppressWarnings("unchecked")
    private <T> T parseString(String v, Class<T> cls) {
        Object value;
        if (v == null || v.length() == 0) {
            value = null;
        } else if (cls == String.class) {
            value = v;
        } else if (cls == Boolean.class || cls == boolean.class) {
            if (v.equalsIgnoreCase("true")) {
                value = Boolean.TRUE;
            } else if (v.equalsIgnoreCase("false")) {
                value = Boolean.FALSE;
            } else {
                throw new IllegalStateException(
                        "Expected true/false, found text '" + v + "'.");
            }
        } else if (cls == Integer.class || cls == int.class) {
            value = Integer.valueOf(v);
        } else if (cls == Long.class || cls == long.class) {
            value = Long.valueOf(v);
        } else if (cls == Float.class || cls == float.class) {
            value = Float.valueOf(v);
        } else if (cls == Double.class || cls == double.class) {
            value = Double.valueOf(v);
        } else if (cls == BigDecimal.class) {
            value = new BigDecimal(v);
        } else if (XMLGregorianCalendar.class == cls) {
            value = MwsUtl.getDTF().newXMLGregorianCalendar(v);
        } else if (Enum.class.isAssignableFrom(cls)) {
            value = MwsUtl.getEnumValue(cls, v);
        } else {
            throw new IllegalArgumentException(String.format("Unable to parse String %s to Class %s", v, cls));
        }
        return (T) value;
    }