/** * Property setter - returns VelPropertySet appropos for #set($foo.bar = "geir"). * <br /> * First tries the regular routine. If a setter was not found, * returns a {@link VelPropertySet} that sets to public fields. * * @param obj the object * @param identifier the name of the property * @param arg the value to set to the property * @param i a bunch of information. * @return a valid <code>VelPropertySet</code>, if it was found. * @throws Exception failed to create a valid <code>VelPropertySet</code>. */ public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i) throws Exception { VelPropertySet setter = super.getPropertySet(obj, identifier, arg, i); if (setter != null) { return setter; } Field field = obj.getClass().getField(identifier); if (field != null) { return new PublicFieldSetter(field); } return null; }