public static final boolean hasSetMethod(OgnlContext context, Object target, Class targetClass, String propertyName) throws IntrospectionException, OgnlException { return isMethodAccessible(context, target, getSetMethod(context, targetClass, propertyName), propertyName); }
public Method getSetMethod(Class targetClass, String propertyName) throws IntrospectionException, ReflectionException { try { return OgnlRuntime.getSetMethod(null, targetClass, propertyName); } catch (OgnlException e) { throw new ReflectionException(e); } }
public static final boolean hasSetMethod(OgnlContext context, Object target, Class targetClass, String propertyName) throws IntrospectionException, OgnlException { return isMethodAccessible(context, target, getSetMethod(context, targetClass, propertyName), propertyName); }
public static final boolean hasSetMethod(OgnlContext context, Object target, Class targetClass, String propertyName) throws IntrospectionException, OgnlException { return isMethodAccessible(context, target, getSetMethod(context, targetClass, propertyName), propertyName); }
public static final boolean setMethodValue(OgnlContext context, Object target, String propertyName, Object value, boolean checkAccessAndExistence) throws OgnlException, IllegalAccessException, NoSuchMethodException, MethodFailedException, IntrospectionException { boolean result = true; Method m = getSetMethod(context, (target == null) ? null : target.getClass(), propertyName); if (checkAccessAndExistence) { if ((m == null) || !context.getMemberAccess().isAccessible(context, target, m, propertyName)) { result = false; } } if (result) { if (m != null) { Object[] args = objectArrayPool.create(value); try { callAppropriateMethod(context, target, target, m.getName(), propertyName, Collections.nCopies(1, m), args); } finally { objectArrayPool.recycle(args); } } else { result = false; } } return result; }
Method m = getSetMethod(context, (target == null) ? null : target.getClass(), propertyName);
Method m = getSetMethod(context, (target == null) ? null : target.getClass(), propertyName);