public static <X, Y> Y getNullSafeValue(Class<X> source, X target, String propertyPath, Class<Y> valueClass) { return getExpression(source, propertyPath, valueClass) .getNullSafeValue(target); }
public static <X, Y> PropertyPathExpressionValueHolder<X, Y> getValueHolder( Class<X> source, X target, String propertyPath, Class<Y> valueClass) { return new PropertyPathExpressionValueHolder<X, Y>(target, getExpression(source, propertyPath, valueClass)); }
public static <X, Y> void setValue(Class<X> source, X target, String propertyPath, Y value) { getExpression(source, propertyPath).setValue(target, value); }
public static Class<?> getResolvedMethodReturnType(Class<?> clazz, String methodName, Class<?>... parameterTypes) { return getResolvedMethodReturnType(clazz, getMethod(clazz, methodName, parameterTypes)); }
public static Class<?>[] getResolvedMethodReturnTypeArguments(Class<?> clazz, String methodName, Class<?>... parameterTypes) { return getResolvedMethodReturnTypeArguments(clazz, getMethod(clazz, methodName, parameterTypes)); }
public static <X, Y> Y getValue(Class<X> source, X target, String propertyPath, Class<Y> valueClass) { return getExpression(source, propertyPath, valueClass).getValue(target); }
public static MethodParameter[] getMethodParameters(Class<?> clazz, String methodName, Class<?>... parameterTypes) { return getMethodParameters(clazz, getMethod(clazz, methodName, parameterTypes)); }
public static Class<?>[] getResolvedMethodExceptionTypes(Class<?> clazz, String methodName, Class<?>... parameterTypes) { return getResolvedMethodExceptionTypes(clazz, getMethod(clazz, methodName, parameterTypes)); }
public static Class<?>[] resolveTypeArguments(Class<?> concreteClass, Type type) { if (type instanceof ParameterizedType) { return resolveTypeArguments(concreteClass, (ParameterizedType) type); } return new Class<?>[0]; }
private static Class<?> getConvertedType(Class<?> declaringClass, java.lang.reflect.Type convertedType, Class<?> javaType) { if (convertedType == null) { return javaType; } return ReflectionUtils.resolveType(declaringClass, convertedType); }
/** * Retrieves all super types of the given class type. Super types are all * types the given class extends or implements. The given class type is also * included in the set. The iteration order of the set has to be from most * concrete to most general. * * @param clazz The class from which the super types should be retrieved * @return The super types of the given class */ public static Set<Class<?>> getSuperTypes(Class<?> clazz) { return getSuperTypes(clazz, Object.class); }
public static <X, Y> PropertyPathExpression<X, Y> getExpression( Class<X> source, String propertyPath) { return getExpression(source, propertyPath, (Class<Y>) null); }
public static <X, Y> Y getNullSafeValue(Class<X> source, X target, String propertyPath) { return getNullSafeValue(source, target, propertyPath, (Class<Y>) null); }
public static <X, Y> PropertyPathExpressionValueHolder<X, Y> getValueHolder( Class<X> source, X target, String propertyPath) { return getValueHolder(source, target, propertyPath, (Class<Y>) null); }
@Override public void setValue(Y value) { expression.setValue(source, value); } }
public static <X, Y> Y getValue(Class<X> source, X target, String propertyPath) { return getValue(source, target, propertyPath, (Class<Y>) null); }
@Override public Y getValue() { return expression.getValue(source); }
@SuppressWarnings("unchecked") public static <X, Y> Y getNullSafeValue(X target, String propertyPath, Class<Y> valueClass) { return target == null ? null : getExpression( (Class<X>) target.getClass(), propertyPath, valueClass) .getNullSafeValue(target); }
@SuppressWarnings("unchecked") public static <X, Y> void setValue(X target, String propertyPath, Y value) { getExpression((Class<X>) target.getClass(), propertyPath).setValue( target, value); }
@SuppressWarnings("unchecked") public static <X, Y> Y getValue(X target, String propertyPath, Class<Y> valueClass) { return getExpression((Class<X>) target.getClass(), propertyPath, valueClass).getValue(target); }