List of usage examples for org.jsoup.helper Validate notEmpty
public static void notEmpty(String string, String msg)
From source file:com.maiseries.core.bank.web.common.util.Reflections.java
/** * ?, ?DeclaredField, ?.//www . ja v a 2 s. c om * * ?Object?, null. */ public static Field getAccessibleField(final Object obj, final String fieldName) { Validate.notNull(obj, "object can't be null"); Validate.notEmpty(fieldName, "fieldName can't be blank"); for (Class<?> superClass = obj.getClass(); superClass != Object.class; superClass = superClass .getSuperclass()) { try { Field field = superClass.getDeclaredField(fieldName); makeAccessible(field); return field; } catch (NoSuchFieldException e) {// NOSONAR // Field??,? continue;// new add } } return null; }
From source file:com.maiseries.core.bank.web.common.util.Reflections.java
/** * ?, ?DeclaredMethod,?. ?Object?, null. * ???+?/*from www. j av a 2 s. c om*/ * * ?. ?Method,?Method.invoke(Object obj, Object... * args) */ public static Method getAccessibleMethod(final Object obj, final String methodName, final Class<?>... parameterTypes) { Validate.notNull(obj, "object can't be null"); Validate.notEmpty(methodName, "methodName can't be blank"); for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType .getSuperclass()) { try { Method method = searchType.getDeclaredMethod(methodName, parameterTypes); makeAccessible(method); return method; } catch (NoSuchMethodException e) { // Method??,? continue;// new add } } return null; }
From source file:com.maiseries.core.bank.web.common.util.Reflections.java
/** * ?, ?DeclaredMethod,?. ?Object?, null. ???? * //from w ww.ja va 2 s. c o m * ?. ?Method,?Method.invoke(Object obj, Object... * args) */ public static Method getAccessibleMethodByName(final Object obj, final String methodName) { Validate.notNull(obj, "object can't be null"); Validate.notEmpty(methodName, "methodName can't be blank"); for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType .getSuperclass()) { Method[] methods = searchType.getDeclaredMethods(); for (Method method : methods) { if (method.getName().equals(methodName)) { makeAccessible(method); return method; } } } return null; }