获取某个类锁指定的泛型参数数组

@param c

@return
10401
public final static Type[] getGenericTypes(Class<?> c) {

        Class<?> myClass = c;

        if (!(c.getGenericSuperclass() instanceof ParameterizedType)) {
            myClass = c.getSuperclass();
        }

        Type superClass = myClass.getGenericSuperclass();
        ParameterizedType type = (ParameterizedType) superClass;
        return type.getActualTypeArguments();
    }
292735
public static String coordToString(double... c) {
        StringBuilder builder = new StringBuilder("(");
        for (int i = 0; i < c.length; i++) {
            builder.append(Math.round(c[i], 2)).append(",");
        }

        if (c.length > 0) {
            builder.setCharAt(builder.length(), ')');
        } else {
            builder.append(")");
        }

        return builder.toString();
    }
355987
public static BeanInfo createBeanInfo(Class<? extends Object> c) {
        BeanInfo bi = DefaultBeanInfoResolver.getBeanInfoHelper(c);
        if (bi == null) {
            bi = new ConfigBeanInfo(c);
            DefaultBeanInfoResolver.addBeanInfo(c, bi);
        }
        return bi;
    }
938127
public static float entropy(int[] c) {
		//total 频率总数
		float total = sum(c);
		if(total==0f)
			return 0f;
		float[] prop = new float[c.length];
		for(int i=0;i<c.length;i++){
			prop[i] = c[i]/(total);	
		}
		return entropy(prop);
	}
141028
public Matrix add(double c)
    {
        Matrix toReturn = getThisSideMatrix(null);
        toReturn.mutableAdd(c);
        return toReturn;
    }
510071
public static int isCNNumeric( char c ) 
    {
        Integer i = cnNumeric.get(c);
        if ( i == null ) return -1;
        return i.intValue();
    }
298234
public static String getConstructorDescriptor(final Constructor<?> c) {
        Class<?>[] parameters = c.getParameterTypes();
        StringBuffer buf = new StringBuffer();
        buf.append('(');
        for (int i = 0; i < parameters.length; ++i) {
            getDescriptor(buf, parameters[i]);
        }
        return buf.append(")V").toString();
    }
66958
public String consumeTo(char c) {
        int offset = nextIndexOf(c);
        if (offset != -1) {
            String consumed = cacheString(charBuf, stringCache, bufPos, offset);
            bufPos += offset;
            return consumed;
        } else {
            return consumeToEnd();
        }
    }
451513
public static CharType getType(char c) {
		CharType tag;
		int type = Character.getType(c);
		if (Character.isLowerCase(c)||Character.isUpperCase(c)){
			tag = CharType.L;
		} else if (c == 12288 || c == 32) {//Character.isWhitespace(c) || Character.isSpaceChar(c)
			tag = CharType.B;
		} else if (Character.isDigit(c)) {
			tag = CharType.D;
//		}else if ("一二三四五六七八九十零〇○".indexOf(c) != -1) {
//			tag[i] = CharType.NUM;
		} else if (type>=20&&type<=30){
//			punP.matcher(String.valueOf(c)).matches()){//"/—-()。!,\"'（）！，””<>《》：:#@￥$%^…&*！、.%".
			tag = CharType.P;
			
		} else {
			tag =CharType.C;
		}
		return tag;
	}
518595
protected final int doSelect(Connection c) throws SQLException {
		Statement stmt = null;
		ResultSet rs = null;
		try {
			stmt = c.createStatement();
			rs = stmt.executeQuery("select * from foo");
			int count = 0;
			while (rs.next()) {
				count++;
			}
			return count;
		} finally {
			if (rs != null) {
				rs.close();
			}
			if (stmt != null) {
				stmt.close();
			}
		}
	}
1003532
protected int charGroup(char c) {
    int         result;

    result = 0;

    if ( (c >= 'a') && (c <= 'z') )
      result = 2;
    else if ( (c >= '0') && (c <= '9') )
      result = 1;

    return result;
  }
405941
public static CharPredicate isChar(final char c) {
    return new CharPredicate() {
      @Override public boolean isChar(char x) {
        return x == c;
      }
      @Override public String toString() {
        return Character.toString(c);
      }
    };
  }
93284
public static String getDesc(Class<?> c) {
		StringBuilder ret = new StringBuilder();

		while (c.isArray()) {
			ret.append('[');
			c = c.getComponentType();
		}

		if (c.isPrimitive()) {
			String t = c.getName();
			if ("void".equals(t))
				ret.append(JVM_VOID);
			else if ("boolean".equals(t))
				ret.append(JVM_BOOLEAN);
			else if ("byte".equals(t))
				ret.append(JVM_BYTE);
			else if ("char".equals(t))
				ret.append(JVM_CHAR);
			else if ("double".equals(t))
				ret.append(JVM_DOUBLE);
			else if ("float".equals(t))
				ret.append(JVM_FLOAT);
			else if ("int".equals(t))
				ret.append(JVM_INT);
			else if ("long".equals(t))
				ret.append(JVM_LONG);
			else if ("short".equals(t))
				ret.append(JVM_SHORT);
		} else {
			ret.append('L');
			ret.append(c.getName().replace('.', '/'));
			ret.append(';');
		}
		return ret.toString();
	}
20735
private boolean containsOnly(String s, char c) {
        for (char c2 : s.toCharArray()) {
            if (c != c2)
                return false;
        }

        return true;
    }
1176162
public static String getName(final Constructor<?> c) {
		StringBuilder ret = new StringBuilder("(");
		Class<?>[] parameterTypes = c.getParameterTypes();
		for (int i = 0; i < parameterTypes.length; i++) {
			if (i > 0)
				ret.append(',');
			ret.append(getName(parameterTypes[i]));
		}
		ret.append(')');
		return ret.toString();
	}
46733
public static Method getGetMethod(Class c, String methodName, Class... paras)
	{

		//需要优化
		try
		{

			Method m = c.getMethod(methodName, paras);
			m.setAccessible(true);
			return m;
		}
		catch (SecurityException e)
		{
			return null;
		}
		catch (NoSuchMethodException e)
		{
			return null;
		}
	}
412244
private static String hex4(char c) {
		char[] r = new char[] { '0', '0', '0', '0' };
		int i = 3;
		while (c > 0) {
			r[i] = HEX_DIGITS[c & 0xF];
			c >>>= 4;
			--i;
		}
		return new String(r);
	}