public static Method getWriteMethod(Class target, String name) { return getWriteMethod(target, name, null); }
public static Method getWriteMethod(Class target, String name) { return getWriteMethod(target, name, null); }
/** * Returns OgnlRuntime.NotFound if the property does not exist. */ public Object setPossibleProperty(Map context, Object target, String name, Object value) throws OgnlException { Object result = null; OgnlContext ognlContext = (OgnlContext) context; try { if (!OgnlRuntime.setMethodValue(ognlContext, target, name, value, true)) { result = OgnlRuntime.setFieldValue(ognlContext, target, name, value) ? null : OgnlRuntime.NotFound; } if (result == OgnlRuntime.NotFound) { Method m = OgnlRuntime.getWriteMethod(target.getClass(), name); if (m != null) { result = m.invoke(target, new Object[] { value}); } } } catch (IntrospectionException ex) { throw new OgnlException(name, ex); } catch (OgnlException ex) { throw ex; } catch (Exception ex) { throw new OgnlException(name, ex); } return result; }
/** * Returns OgnlRuntime.NotFound if the property does not exist. */ public Object setPossibleProperty(Map context, Object target, String name, Object value) throws OgnlException { Object result = null; OgnlContext ognlContext = (OgnlContext) context; try { if (!OgnlRuntime.setMethodValue(ognlContext, target, name, value, true)) { result = OgnlRuntime.setFieldValue(ognlContext, target, name, value) ? null : OgnlRuntime.NotFound; } if (result == OgnlRuntime.NotFound) { Method m = OgnlRuntime.getWriteMethod(target.getClass(), name); if (m != null) { result = m.invoke(target, new Object[] { value}); } } } catch (IntrospectionException ex) { throw new OgnlException(name, ex); } catch (OgnlException ex) { throw ex; } catch (Exception ex) { throw new OgnlException(name, ex); } return result; }
Method m = OgnlRuntime.getWriteMethod(target.getClass(), methodName); m = OgnlRuntime.getWriteMethod(target.getClass(), (currentObjectStr.indexOf('"') >= 0? currentObjectStr.replaceAll("\"", "") : currentObjectStr));
Method m = OgnlRuntime.getWriteMethod(target.getClass(), methodName); m = OgnlRuntime.getWriteMethod(target.getClass(), (currentObjectStr.indexOf('"') >= 0? currentObjectStr.replaceAll("\"", "") : currentObjectStr));
Method m = OgnlRuntime.getWriteMethod(target.getClass(), indexStr);
Method m = OgnlRuntime.getWriteMethod(target.getClass(), indexStr);
Method m = OgnlRuntime.getWriteMethod(context.getCurrentType() != null ? context.getCurrentType() : target.getClass(), _methodName, getChildrenClasses(context, _children));
Method m = OgnlRuntime.getWriteMethod(context.getCurrentType() != null ? context.getCurrentType() : target.getClass(), _methodName, getChildrenClasses(context, _children));
m = OgnlRuntime.getWriteMethod(target.getClass(), _methodName, argumentClasses);
m = OgnlRuntime.getWriteMethod(target.getClass(), _methodName, argumentClasses);
m = OgnlRuntime.getWriteMethod(context.getCurrentObject().getClass(), name); Class parm = m.getParameterTypes()[0]; String cast = parm.isArray() ? ExpressionCompiler.getCastString(parm) : parm.getName();
m = OgnlRuntime.getWriteMethod(context.getCurrentObject().getClass(), name); Class parm = m.getParameterTypes()[0]; String cast = parm.isArray() ? ExpressionCompiler.getCastString(parm) : parm.getName();